You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While sets are not ordered, type signatures need list items in a specific order, or the type checker will complain.
Eg, Set '[Natural 0, Natural 1] vs Set '[Natural 1, Natural 0]
Your examples suggest to leave off the type signatures and let them be inferred, sidestepping this problem. Which is fine, but in my application, the content of the set is important documentation, so I'd rather include type signatures.
I don't know if this is fixable with current ghc's Data.Type.Equality
The text was updated successfully, but these errors were encountered:
Hi! Yes, the examples tend to rely on inferring the types, but you can use the AsMap type-level function to do the normalisation for you in a type signature. See for example, foo' in https://github.com/dorchard/type-level-sets/blob/master/example.hs. So you can include the type signature, but you don't have to normalise yourself. Does this help?
While sets are not ordered, type signatures need list items in a specific order, or the type checker will complain.
Eg, Set '[Natural 0, Natural 1] vs Set '[Natural 1, Natural 0]
Your examples suggest to leave off the type signatures and let them be inferred, sidestepping this problem. Which is fine, but in my application, the content of the set is important documentation, so I'd rather include type signatures.
I don't know if this is fixable with current ghc's Data.Type.Equality
The text was updated successfully, but these errors were encountered: