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

Henning Thielemann lemming at henning-thielemann.de
Wed Mar 2 04:04:20 EST 2005

On Wed, 2 Mar 2005, Ben Lippmeier wrote:

> You can play games with the type checker to force them to have the same
> type without changing the "meaning" of your function.
> fun1' f (Left x)    = if True then Left (f x) else Left x

Left (f x) `asTypeOf` Left x


More information about the Haskell-Cafe mailing list