[Haskell-cafe] Alternate instance Show (Maybe a)?
doublef-ctm at yandex.ru
Fri Feb 2 15:10:13 EST 2007
Suppose I want show Nothing to return "", and show (Just foo) return
show foo. I don't seem to be able to. Looks like I either have to use
some other function name, like `mShow', or have to import Prelude hiding
Maybe, reimplement Maybe, write all the other useful instances (Functor,
Monad) for it, etc. Not particularly hard, but looks ugly. Isn't there a
better solution? I recall some discussion about this, but can't find it
in the archives...
No virus detected in this message. Ehrm, wait a minute...
/kernel: pid 56921 (antivirus), uid 32000: exited on signal 9
Oh yes, no virus:)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 187 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20070202/0d04e322/attachment.bin
More information about the Haskell-Cafe