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
There are issues with derivedArgDict here and I think I found another one.
I want to define Foo with two type parameters a and b. And the usage of a(b is ok) in the place of b causes the issue.
dataFooabwhereFoo::FooaInt-- okBar::Fooa (a) -- not ok
deriveGEq ''Foo
deriveGCompare ''Foo
deriveGShow ''Foo
deriveArgDict ''Foo -- fails
So I expanded TH.
dataFooabwhereFoo::FooaInt-- okBar::Fooa [a] -- not ok
deriveGEq ''Foo
deriveGCompare ''Foo
deriveGShow ''Foo
instance (c_a3QI3Int, c_a3QI3 [a_a3QzU]) =>Hasc_a3QI3 (Fooa_a3QI2) where
argDict
=\caseFoo {} ->DictBar {} ->Dict
I think the a_a3QzU is not correct. So I corrected it as follows.
dataFooabwhereFoo::FooaInt-- okBar::Fooa [a] -- not ok
deriveGEq ''Foo
deriveGCompare ''Foo
deriveGShow ''Foo
instance (cInt, c [a]) =>Hasc (Fooa) where
argDict
=\caseFoo {} ->DictBar {} ->Dict
Then it worked!
First, is the hand-written instance correct?
Also, can the instance be derived?
The text was updated successfully, but these errors were encountered:
There are issues with
derivedArgDict
here and I think I found another one.I want to define
Foo
with two type parametersa
andb
. And the usage ofa
(b
is ok) in the place ofb
causes the issue.So I expanded TH.
I think the
a_a3QzU
is not correct. So I corrected it as follows.Then it worked!
First, is the hand-written instance correct?
Also, can the instance be derived?
The text was updated successfully, but these errors were encountered: