[Haskell-cafe] Language simplicity

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Wed Jan 13 14:49:02 EST 2010

On Jan 13, 2010, at 14:42 , Andrew Coppin wrote:
> Brandon S. Allbery KF8NH wrote:
>> On Jan 13, 2010, at 14:25 , Andrew Coppin wrote:
>>> Colin Paul Adams wrote:
>>>>   Andrew> It's weird that us Haskell people complain about there
>>>>   Andrew> being only 26 letters in the alphabet
>>>> Which alphabet?
>>>> You have plenty of choice in Unicode.
>>> Er... I was under the impression that Haskell source code uses the  
>>> ASCII character set, not Unicode.
>> The Report would beg to differ with you; see section 2.1.  "Haskell  
>> uses the Unicode [11] character set. However, source programs are  
>> currently biased toward the ASCII character set used in earlier  
>> versions of Haskell ."  ("Currently" at the time being 1998.   
>> Unicode is more prevalent these days.)
> So... how would GHC tell which of the hundreds of millions of  
> possible character encodings is in use?

That's left to the compiler implementation.  I'm not spotting an  
official statement in the GHC manual, but in practice GHC uses UTF-8.   
(It might support Windows standard UTF-16 as well; if do, it probably  
requires the first character of the source file to be a UTF-16 byte  
order mark.)

>>> (And even if that's not the case, I've yet to find a way to type  
>>> in the Unicode characters which are hypothetically possible.)
>> That's a problem with your editor/development environment.
> Or rather, the problem with every computer system known to man?


The existence of -XUnicodeSyntax ( http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#unicode-syntax 
  ) suggests that at least some other GHC users don't have your problem.

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20100113/f9154104/PGP.bin

More information about the Haskell-Cafe mailing list