From f604c96abbb1ca609aba60e4129c1fc1ec6384a1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 12 Nov 2015 12:11:23 -0400 Subject: anwser --- ...ent_3_b6e6a50654fcac2f624c43a04e12c4d6._comment | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 doc/forum/REversable_property_changes/comment_3_b6e6a50654fcac2f624c43a04e12c4d6._comment (limited to 'doc/forum/REversable_property_changes/comment_3_b6e6a50654fcac2f624c43a04e12c4d6._comment') diff --git a/doc/forum/REversable_property_changes/comment_3_b6e6a50654fcac2f624c43a04e12c4d6._comment b/doc/forum/REversable_property_changes/comment_3_b6e6a50654fcac2f624c43a04e12c4d6._comment new file mode 100644 index 00000000..ed7fdfca --- /dev/null +++ b/doc/forum/REversable_property_changes/comment_3_b6e6a50654fcac2f624c43a04e12c4d6._comment @@ -0,0 +1,24 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 3""" + date="2015-11-12T16:05:44Z" + content=""" +Ok, what's going on is that the combination of a RevertableProperty and a +Property with requires has changed from being a RevertableProperty before +to a Property now. (Because it can't all be reverted.) + +Since your code has `schroot :: RevertableProperty HasInfo` +ghc complains that the type it infers doesn't match. Changing that to +`Property HasInfo` will clear up the type error. + +Unfortunate that the error message is complicated in this case by the +use of CInfo and CombinedType. If you notice that +`CInfo HasInfo NoInfo = HasInfo` and that `CombinedType (RevertableProperty +HasInfo) (Property NoInfo) = Property HasInfo`, a better error message +would be: + + Couldn't match type ‘Property HasInfo' + with ‘RevertableProperty HasInfo’ + Expected type: RevertableProperty HasInfo + Actual type: Property HasInfo +"""]] -- cgit v1.2.3