Unicode's greek lambda
Kazu Yamamoto ( 山本和彦 )
kazu at iij.ad.jp
Tue Nov 18 20:53:22 EST 2008
First of all, thank you for those who replied kindly.
> > > > When the -XUnicodeSyntax option is specified, GHC accepts some Unicode
> > > > characters including left/right arrows. Unfortunately, the letter
> > > > "greek lambda" cannot be used. Are there any technical reasons to not
> > > > accept it?
> > >
> > > The "greek lambda" is a normal lower-case alphabetic character - it can
> > > be used in identifier names.
OK. I understand.
> > But it could be a reserved word synonymous with \. After all, \ can
> > occur in operator symbols, but the operator \ is reserved.
> Presumably that would let you do (\ x -> ...) but not (\x -> ) since the
> "\x" would run together and lexically it would be one identifier.
If we reserve the greek lambda as special like '\', the lexer can
separate <lambda>x into two tokens: <lambda> and 'x', I guess.
Some people may want to use the greek lambda in identifiers. And some
would want to use the greek lambda as an alternative of '\'. So, how
about providing a new option to make the greek lambda special?
I want to type the examples in "Programming in Haskell" as is.
More information about the Glasgow-haskell-users