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
{{ message }}
This repository has been archived by the owner on Mar 21, 2020. It is now read-only.
But I wonder, doesn't/couldn't deriveGEq, deriveGCompare support deriving these kinds of instances somehow? Because hand-defining these doesn't scale much. E.g.
deriveGEq ''Foo2
deriveGCompare ''Foo2
deriveGEq ''(Foo2 n)
deriveGCompare ''(Foo2 n)
These give me the following kinds of errors, respectively:
exp-dep-map.hs:39:1:error:•Expecting one more argument to ‘Foo2’Expected kind ‘*->*’, but ‘Foo2’ has kind ‘*->*->*’•In the first argument of‘GEq’, namely ‘Foo2’In the instance declaration for ‘GEqFoo2’|39| deriveGEq ''Foo
|^^^^^^^^^^^^^^^^^^^^
exp-dep-map.hs:40:19:error: parse error on input ‘Foo2’|40| deriveGEq ''(Foo2 n)
|^^^
Also, is #6 relevant? PolyKinds makes me think that it may be, as one of the type errors is a kind-error.
cc obsidiansystems/dependent-map#16, because it would be nice to see a small self-contained example in the readme/docs if/when pol'ism is supported.
p.s. If it turns out that this is hard to solve with TH, maybe instances can be derived via generics too?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Here I've asked a question initially about polymorphism with
dependent-map
s.And we've found that the following definitions can work.
If one defines instances by hand, e.g.:
But I wonder, doesn't/couldn't
deriveGEq
,deriveGCompare
support deriving these kinds of instances somehow? Because hand-defining these doesn't scale much. E.g.These give me the following kinds of errors, respectively:
Also, is #6 relevant? PolyKinds makes me think that it may be, as one of the type errors is a kind-error.
cc obsidiansystems/dependent-map#16, because it would be nice to see a small self-contained example in the readme/docs if/when pol'ism is supported.
p.s. If it turns out that this is hard to solve with TH, maybe instances can be derived via generics too?
The text was updated successfully, but these errors were encountered: