Re: Character properties

From: Marcin 'Qrczak' Kowalczyk (
Date: Thu Sep 21 2000 - 20:00:15 EDT

Thu, 21 Sep 2000 23:55:24 +0330 (IRT), Roozbeh Pournader <> pisze:

> > isDigit intentionally recognizes ASCII digits only. IMHO it's more
> > often needed and this is what the Haskell 98 Report says. (But I
> > don't follow the report in some other cases.)
> Would you please give me some URL?
The Haskell 98 Library Report, module Char.

> I disagree with the isDigit case, simply because my main language,
> Persian, uses alternate digits when written.

Do they form numbers in the same way as ASCII digits?

Does Unicode character database provide a way to tell which digits
form numbers in this way (decimal, "big Endian")?

Do you think that they (and digits from other languages) should
be recognized as numbers in sources for programming languages that
generally accept foreign letters in identifiers? (I don't know what
Haskell gurus would say for that.)

What about isOctDigit and isHexDigit?

Haskell provides digitToInt and intToDigit which currently deal with
ASCII digits and hexadecimal "digits" A..F a..f. If isDigit accepted
foreign digits, it would make sense to extend digitToInt to convert
them too. But obviously not intToDigit.

BTW. For using foreign alphabets in identifiers, Haskell divides
identifiers into two classes basing on the case of the first letter,
similarly to Prolog, SML, OCaml, Clean. It is a problem for alphabets
without cases. I'm not sure what should be done with it. Haskell98
says that letters which are not lowercase should be considered
uppercase. I don't agree with it and my library extension/change
proposal allows characters which are isAlpha but neither isLower nor
isUpper. When carried to Haskell sources, it's not obvious how to
classify identifiers starting with these letters.

 __("<  Marcin Kowalczyk *
  ^^                      SYGNATURA ZASTĘPCZA

This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:21:13 EDT