
23 Sep
2008
23 Sep
'08
12:44 p.m.
On Tue, Sep 23, 2008 at 6:36 PM, Wolfgang Jeltsch
Pattern matching against the data constructor GADT specializes a to (). Since Class uses a functional dependency, it is clear that b has to be ().
True, but it wont work if you provide () as the result and b in the explicit signature. GHC is ranting with reason, the provided type, b, does not match (). On the other hand, this works: fun :: (Class a b) => GADT a -> b fun GADT = undefined And as you stated, b can only be ()