[Haskell-cafe] how do I avoid excessive constructor application?
S. Alexander Jacobson
alex at alexjacobson.com
Wed Mar 2 10:02:19 EST 2005
I'd like to do this sort of thing with types other than Either.
Is there a generic safe coerce function?
On Wed, 2 Mar 2005, Stefan Holdermans wrote:
>> 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
S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com
More information about the Haskell-Cafe