[Haskell] Should the following program be accepted by ghc?

Jonathan Cast jonathanccast at fastmail.fm
Wed Jan 16 22:35:49 EST 2008


On 16 Jan 2008, at 5:59 PM, Bruno Oliveira wrote:

> Hello,
>
> Maybe a more slightly more honest type for "decomp" would be:) :
>
> decomp :: Injective f => f a :=: f b -> a :=: b

Perhaps.  Although you *have* to have an implicit Injective  
constraint on all type constructor variables to pull of Haskell's  
first-order unification trick, so it's not a constraint that will be  
relaxed soon (or, most likely, ever).

jcc



More information about the Haskell mailing list