The datatype introduced for the internal representation of Unicode code
points is currently defined as newtype UPoint = UPoint Int. The
shift to code points UPoint from characters Char is intentional, as
Unicode support in Haskell is not yet fully implemented, and code points
are, anyway, different entities. Since the UPoint type is an instance
of the Enum class, the type's constructor and destructor functions are
available as toEnum and fromEnum, respectively.
The UPoint datatype should be the transfer point on the way from one
encoding into another. It should not be the terminal stop, though. The
encode method should be used systematically, and not show, even if
it might temporarily produce somehow appealing results.
|