Re: unicode support

Malcolm Wallace <[email protected]> Sun, 8 May 2005 10:51:55 +0100
Newsgroups gmane.comp.lang.haskell.nhc.bugs
Organization Dept of Computer Science, University of York
Message-ID <[email protected]>
Antonio Regidor Garc=EDa <[email protected]> writes:

>     toEnum   c =3D toEnum c	-- MAGIC
>     fromEnum c =3D fromEnum c	-- MAGIC
>=20
> What does this "MAGIC" mean?

MAGIC means that the function is translated internally to a single
bytecode instruction.  There are quite a few MAGIC comments within the
nhc98 implementation of the prelude, mainly for numeric operations.

> Do the right hand sides use the prelude
> functions of the compiler that nhc is built with,

No.

> or the internal representation of chars is defined in other place?

The internal representation of a Char is identical to an Int - at least
32 bits.

Regards,
    Malcolm