summaryrefslogtreecommitdiff
path: root/doc/forum/Combining_properties_with_HasInfo_and_another_without_HasInfo/comment_1_6e0f5ebebe81a632dccafb97cfe49e70._comment
blob: 04eb0f2b888e1a73d08e0012899c74a17dcccb5a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
<http://hackage.haskell.org/package/type-level-sets>
or something like it would avoid the problem, and is planned eventually.
(But not yet, it [affects compile performance](https://github.com/dorchard/type-level-sets/issues/17)
and [actually still depends on list ordering](https://github.com/dorchard/type-level-sets/issues/5).)

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.
"""]]