> I got the GADT
>
> data DataBox where
>   DataBox :: (Show d, Eq d, Data d) => d -> DataBox
>
[snip]
>
> but I can't figure out how to implement gunfold for DataBox.
>
> The error message is
>
> Text/XML/Generic.hs:274:23:
>     Ambiguous type variable `b' in the constraints:

I had a similar difficultly in Atom making a GADT a member of Eq.  At
one point I had my head wrapped around the reason for the problem, but
now it escapes me.  However, I remember the solution: I created a
function to convert the GADT into another, unGADT type, which was then
used to compute (==).
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to