[Haskell-cafe] Hugs vs GHC (again) was: Re: Somerandomnewbiequestions

Simon Marlow simonmar at microsoft.com
Tue Jan 11 08:11:28 EST 2005

On 07 January 2005 17:10, Malcolm Wallace wrote:

> "Simon Marlow" <simonmar at microsoft.com> writes:
>>>>  - Can the Char type hold the full range of Unicode characters?
>>>>    This has been true in GHC for some time, and is now true in
>>>>    Hugs. I don't think it's true in nhc98 (please correct me if
>>>> I'm wrong). 
>>> You're wrong :-).  nhc98 has always had 32-bit characters
>>> internally. 
>> I checked the nhc98 sources, and it seems that maxBound::Char is
>> '\255'. 
> Yes, but nothing prevents you from creating a larger character by e.g.
>     (toEnum 0x12345678) :: Char

Then I respectfully submit a bug report :-)   It shouldn't be possible
to create a value of Char outside minBound..maxBound.  It's possible the
report doesn't say this explicitly, but see for example section 6.3.4.


More information about the Haskell-Cafe mailing list