impossible :: Empty -> a impossible _ = undefined
It's unfortunate that we can't define impossible without using bottom. I dislike using bottom, and here we have a function that cannot return bottom unless it is passed bottom. Such functions should be definable without using bottom, but this one isn't.
You may not think this is any less ugly, but here is one way:
>class Impossible t where impossible :: t -> a >instance Impossible Empty
Regards, Yitz _______________________________________________ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell