[Haskell-cafe] Type-class conditional behavior

Andrew Coppin andrewcoppin at btinternet.com
Mon May 9 23:56:22 CEST 2011


On 08/05/2011 06:14 AM, Nicholas Tung wrote:
> Dear all,
>
>      I'd like to write a function "maybeShow :: a -> Maybe String",
> which runs "show" if its argument is of class Show.

This is surely an FAQ. Is the answer listed somewhere?



More information about the Haskell-Cafe mailing list