diff options
authorJoey Hess2019-09-16 11:21:12 -0400
committerJoey Hess2019-09-16 11:21:12 -0400
commita09237766cfa73446eb7d32a84ce641118433c70 (patch)
parent050cece6453c844fdb0c90307fae37dfb1ce90e6 (diff)
1 files changed, 21 insertions, 0 deletions
diff --git a/doc/forum/Combining_properties_with_HasInfo_and_another_without_HasInfo/comment_1_6e0f5ebebe81a632dccafb97cfe49e70._comment b/doc/forum/Combining_properties_with_HasInfo_and_another_without_HasInfo/comment_1_6e0f5ebebe81a632dccafb97cfe49e70._comment
new file mode 100644
index 00000000..04eb0f2b
--- /dev/null
+++ b/doc/forum/Combining_properties_with_HasInfo_and_another_without_HasInfo/comment_1_6e0f5ebebe81a632dccafb97cfe49e70._comment
@@ -0,0 +1,21 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2019-09-16T15:07:56Z"
+ content="""
+The problem is that you have "Debian + HasInfo" and the compiler expects
+"HasInfo + Debian". If you swap the order it will compile.
+Internally these types are represented as type-level lists, eg
+`[Debian, HasInfo]`. Unfortunately list items are ordered.
+What's needed is a type-level set. Using
+or something like it would avoid the problem, and is planned eventually.
+(But not yet, it [affects compile performance](
+and [actually still depends on list ordering](
+In the meantime, there's a de-facto standard ordering of the items in a
+Property's metatypes list, and using some other ordering will result
+in this problem. If you let ghc infer the type of a property, the result
+will always use the standard ordering.