Unicode's greek lambda
marlowsd at gmail.com
Wed Nov 19 08:21:49 EST 2008
Duncan Coutts wrote:
> On Tue, 2008-11-18 at 11:51 +0000, Ross Paterson wrote:
>> On Tue, Nov 18, 2008 at 10:30:01AM +0000, Malcolm Wallace wrote:
>>>> 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.
>> 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.
Exactly. Here's the relevant patch:
Tue Jan 16 16:11:00 GMT 2007 Simon Marlow <simonmar at microsoft.com>
* Remove special lambda unicode character, it didn't work anyway
Since lambda is a lower-case letter, it's debatable whether we want to
steal it to mean lambda in Haskell source. However if we did, then we
would probably want to make it a "special" symbol, not just a reserved
symbol, otherwise writing \x->... (using unicode characters of course)
wouldn't work, because \x would be treated as a single identifier,
you'd need a space.
More information about the Glasgow-haskell-users