Simon Marlow wrote:

> > With a quick grep through the two programs, my guess is that 'toEnum'
> > is being specialised at type Char to an internal function 'chr', and
> > that the implementation of 'chr' only converts Ints up to some limit
> > like 128.  (Both programs apply toEnum to Ints in the range
> > 128<c<256.)
> >
> > If this is the case, it should be easy to fix.
>
> This is our chr:
>
>         chr :: Int -> Char
>         chr (I# i) | i >=# 0# && i <=# 255# = C# (chr# i)
>                    | otherwise = error ("Prelude.chr: bad argument")

So a Haskell program that (perhaps inadvertently) uses a Unicode character
will fail with ghc.

When is ghc going to implement full Haskell? :)

--

        -- Lennart




Reply via email to