[Haskell-cafe] Hugs vs GHC (again) was: Re: Some random
newbiequestions
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Mon Jan 10 19:47:45 EST 2005
Jérémy Bobbio <jeremy.bobbio at etu.upmc.fr> writes:
>> Once this is agreed, it would be easy to make scripts which generate
>> C code from UnicodeData.txt tables from Unicode. I think table-driven
>> predicates and toUpper/toLower should better be implemented in C;
>> Haskell is not good at static constant tables with numbers.
>
> Sebastien Carlier already wrote this for hOp, see :
> http://etudiants.insia.org/~jbobbio/hOp/Gen_wctype.hs
And I've done a similar thing for my language Kogut some time ago:
http://cvs.sourceforge.net/viewcvs.py/kokogut/kokogut/runtime/make-char-tables.in?view=markup
http://cvs.sourceforge.net/viewcvs.py/kokogut/kokogut/lib/Core/Kokogut/Characters.ko?view=markup
Let's see how these separately developed interpretations of predicates differ
(mine also have different names and there are a few more):
|Sebastien's| mine
-------+-----------+----------
alnum | L* N* | L* N*
alpha | L* | L*
cntrl | Cc | Cc Zl Zp
digit | N* | Nd
lower | Ll | Ll
punct | P* | P*
upper | Lu | Lt Lu
blank | Z* \t\n\r | Z*(except U+00A0 U+2007 U+202F) \t\n\v\f\r U+0085
Note that the interpretation of "digit" differs from both C and
Haskell 98 which specify it to be ASCII-only. Actually I have
ASCII-only variants of IsDigit parametrized by the number base.
--
__("< Marcin Kowalczyk
\__/ qrczak at knm.org.pl
^^ http://qrnik.knm.org.pl/~qrczak/
More information about the Haskell-Cafe
mailing list