|author||Joey Hess||2016-02-08 11:19:23 -0400|
|committer||Joey Hess||2016-02-08 11:19:23 -0400|
Diffstat (limited to 'doc/forum/howto_mapM_RevertableProperty/comment_1_c2800340a5361add82f5e9e30b56b18c._comment')
1 files changed, 22 insertions, 0 deletions
diff --git a/doc/forum/howto_mapM_RevertableProperty/comment_1_c2800340a5361add82f5e9e30b56b18c._comment b/doc/forum/howto_mapM_RevertableProperty/comment_1_c2800340a5361add82f5e9e30b56b18c._comment
new file mode 100644
@@ -0,0 +1,22 @@
+ subject="""comment 1"""
+combineProperties takes a list of PropertyListType, which is a type family
+consisting of [Property NoInfo] and [Property HasInfo]. So, you need to get
+from RevertableProperty NoInfo to one of those. `toProp` can do that.
+ combineProperties "desc" (map (toProp . myProperty) confs)
+But! I had a look and it was easy to make [RevertableProperty i] an
+instance of PropertyListType, which makes what you already tried type check
+too. I've done so in git.
+It would perhaps be nice to make lists of various sorts of properties
+instances of Traversable, so that mapM etc could be used over them. That
+would need some kind of monad for combining properties though, which does
+not currently exist. Might make more sense to make an instance of Foldable
+or just Monoid for properties. Any improvements in this area would be