Closed paulyoung closed 6 years ago
@kritzcreek said:
Did you try to inline the type synonym? I think the problem might be in
type Bind' a = Tuple (Tuple a Ident) (Expr a)
the onea
there appears on the left tuple side, the generated code might be trying to map over it instead
@garyb said:
yup, that's the one deriving can't deal with the need to
lmap
or anything - it will only attempt tomap
on the inner values
@kritzcreek said:
It works out because GHC has special knowledge about tuples I guess If you use a record instead of a tuple type in the PS code it might work?
Yes, you'll need to either write a manual instance, switch to a record, or use something like Product (Tuple Ident) Expr a
to turn everything into a Functor
looking shape.
This is just to demonstrate the issue with some Functor instances in #42.