[Haskell-cafe] how do I avoid excessive constructor application?

Stefan Holdermans sholderm at students.cs.uu.nl
Wed Mar 2 09:54:51 EST 2005


Lemmih,

> And you can "fix" it with some unsafeCoerce# magic. (:

Actually, as I pointed out, the required coercion in perfectly safe, 
though not implicit:

coerceRight :: Either a b -> Either c b
coerceRight (Right b) = Right b

Regards,

Stefan



More information about the Haskell-Cafe mailing list