[Haskell-cafe] a Char->Char function?

Lennart Augustsson lennart at augustsson.net
Sat Dec 8 04:24:57 EST 2007


0x02 is not a Char, it's a numeric constant.  Perhaps you meant '\x02' ?

On Dec 8, 2007 9:02 AM, Galchin Vasili <vigalchin at gmail.com> wrote:

> Hello,
>
>     I am writing a function(actually much more than this):
>
> bozo :: Char -> Char
> bozo 0x02 = 'a'
> ...
>
> However, I get complaints from ghc suggesting that I should add an
> "instance declaration (Num, Char). I (mistaking) thought I understood the
> Haskell class hierarchy and the associated constraints .. but apparently not
> .. => help please. Should
>
> Kind regards, Vasya
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20071208/1259ad11/attachment.htm


More information about the Haskell-Cafe mailing list