[Haskell-cafe] Hugs vs GHC (again) was: Re: Some random newbiequestions

Ketil Malde ketil+haskell at ii.uib.no
Mon Jan 10 05:13:51 EST 2005

Marcin 'Qrczak' Kowalczyk <qrczak at knm.org.pl> writes:

>>  - Do the character class functions (isUpper, isAlpha etc.) work
>>    correctly on the full range of Unicode characters?

> It's not obvious what the predicates should really mean, e.g. should
> isDigit and isHexDigit include non-ASCII digits or should isSpace
> include non-breaking space characters.

I think perhaps the answer is all of the above.  The functions could
be defined in multiple modules, so that 'ASCII.isSpace' would match
the "normal" space character only, while 'Unicode.isSpace' could match
all the weird and wonderful stuff in the standard.

I also have the feeling that 'String' and/or 'Char' should be classes
rather than data types (perhaps with 'String' built on top of a more
general 'Sequence' type?)  Ideally, you could treat an array as well
as a list as a string.


If I haven't seen further, it is by standing in the footprints of giants

More information about the Haskell-Cafe mailing list