I'd like to do this sort of thing with types other than Either.
Is there a generic safe coerce function?

-Alex-


On Wed, 2 Mar 2005, Stefan Holdermans wrote:

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


______________________________________________________________ S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to