Unicode's greek lambda

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Unicode's greek lambda

Kazu Yamamoto (山本和彦)
Hello,

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?

Regards,

--Kazu
_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unicode's greek lambda

Malcolm Wallace
> 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.

Regards,
    Malcolm
_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unicode's greek lambda

Bulat Ziganshin-2
In reply to this post by Kazu Yamamoto (山本和彦)
Hello Kazu,

Tuesday, November 18, 2008, 12:00:25 PM, you wrote:

> characters including left/right arrows. Unfortunately, the letter
> "greek lambda" cannot be used. Are there any technical reasons to not
> accept it?

i think it is accepted as usual letter - reason is that greeks can
use it in their identifiers :)


--
Best regards,
 Bulat                            mailto:[hidden email]

_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unicode's greek lambda

Ross Paterson
In reply to this post by Malcolm Wallace
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.
_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unicode's greek lambda

Duncan Coutts
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.

Duncan

_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unicode's greek lambda

Donn Cave-4
In reply to this post by Kazu Yamamoto (山本和彦)
Quoth Duncan Coutts <[hidden email]>:
| On Tue, 2008-11-18 at 11:51 +0000, Ross Paterson wrote:

|> 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.

Good, that's clearly the right way to do it anyway!

        Donn
_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unicode's greek lambda

Kazu Yamamoto (山本和彦)
In reply to this post by Duncan Coutts
Hello,

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?

P.S.

I want to type the examples in "Programming in Haskell" as is.

--Kazu
_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unicode's greek lambda

Brandon S Allbery KF8NH
On 2008 Nov 18, at 20:53, Kazu Yamamoto (山本和彦) wrote:
> If we reserve the greek lambda as special like '\', the lexer can
> separate <lambda>x into two tokens: <lambda> and 'x', I guess.


Not without redefining it as a symbol instead of a lowercase letter,  
which won't be done as previously discussed.

--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [hidden email]
system administrator [openafs,heimdal,too many hats] [hidden email]
electrical and computer engineering, carnegie mellon university    KF8NH


_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unicode's greek lambda

Kazu Yamamoto (山本和彦)
Hello,

> > If we reserve the greek lambda as special like '\', the lexer can
> > separate <lambda>x into two tokens: <lambda> and 'x', I guess.
>
> Not without redefining it as a symbol instead of a lowercase letter,
> which won't be done as previously discussed.

OK. Fine with me since this topic was previously discussed.

--Kazu
_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unicode's greek lambda

Michał Pałka
In reply to this post by Kazu Yamamoto (山本和彦)
Hi,

Perhaps it would be possible to convince your text editor to display '\'
as, let's say, bold lambda? Of course it would need to know which '\'
mean lambdas.

Best,
Michał

On Tue, 2008-11-18 at 18:00 +0900, Kazu Yamamoto wrote:

> Hello,
>
> 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?
>
> Regards,
>
> --Kazu
> _______________________________________________
> Glasgow-haskell-users mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>

_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unicode's greek lambda

Simon Marlow-7
In reply to this post by Duncan Coutts
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 <[hidden email]>
   * 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.

Cheers,
        Simon

_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unicode's greek lambda

Tony Finch
On Wed, 19 Nov 2008, Simon Marlow wrote:
>
> Tue Jan 16 16:11:00 GMT 2007  Simon Marlow <[hidden email]>
>   * 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.

There are a number of mathematical lambdas in Unicode (distinct from teh
Greek lambdas), but they are not in the basic multilingual plane and they
are presumably not very easy to type :-)

Tony.
--
f.anthony.n.finch  <[hidden email]>  http://dotat.at/
VIKING NORTH UTSIRE SOUTH UTSIRE: NORTHWESTERLY 6 TO GALE 8, OCCASIONALLY
SEVERE GALE 9 IN VIKING AND SOUTH UTSIRE. VERY ROUGH, OCCASIONALLY HIGH. RAIN
THEN SHOWERS, WINTRY LATER IN VIKING AND NORTH UTSIRE. MODERATE OR GOOD,
OCCASIONALLY POOR.
_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unicode's greek lambda

Duncan Coutts
On Wed, 2008-11-19 at 15:01 +0000, Tony Finch wrote:

> On Wed, 19 Nov 2008, Simon Marlow wrote:
> >
> > Tue Jan 16 16:11:00 GMT 2007  Simon Marlow <[hidden email]>
> >   * 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.
>
> There are a number of mathematical lambdas in Unicode (distinct from teh
> Greek lambdas), but they are not in the basic multilingual plane and they
> are presumably not very easy to type :-)

Do you know what they are? I couldn't find any other than the greek
lambda λ and the latin lambda with stroke ƛ.

Duncan

_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unicode's greek lambda

David Menendez-2
On Wed, Nov 19, 2008 at 5:24 PM, Duncan Coutts
<[hidden email]> wrote:

> On Wed, 2008-11-19 at 15:01 +0000, Tony Finch wrote:
>> On Wed, 19 Nov 2008, Simon Marlow wrote:
>> >
>> > Tue Jan 16 16:11:00 GMT 2007  Simon Marlow <[hidden email]>
>> >   * 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.
>>
>> There are a number of mathematical lambdas in Unicode (distinct from teh
>> Greek lambdas), but they are not in the basic multilingual plane and they
>> are presumably not very easy to type :-)
>
> Do you know what they are? I couldn't find any other than the greek
> lambda λ and the latin lambda with stroke ƛ.
They're listed under Mathematical Alphanumeric Symbols.
<http://www.unicode.org/charts/PDF/U1D400.pdf>

e.g., 1D6CC mathematical bold small lambda


--
Dave Menendez <[hidden email]>
<http://www.eyrie.org/~zednenem/>

_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unicode's greek lambda

Jan Jakubuv-2
Some others are (I have no idea why they are referenced as "lamda"
instead of "lambda"):

039B    GREEK CAPITAL LETTER LAMDA
03BB    GREEK SMALL LETTER LAMDA
1D27    GREEK LETTER SMALL CAPITAL LAMDA
1038D   UGARITIC LETTER LAMDA
1D6B2   MATHEMATICAL BOLD CAPITAL LAMDA
        # <font> 039B greek capital letter lamda
1D6CC   MATHEMATICAL BOLD SMALL LAMDA
        # <font> 03BB greek small letter lamda
1D6EC   MATHEMATICAL ITALIC CAPITAL LAMDA
        # <font> 039B greek capital letter lamda
1D706   MATHEMATICAL ITALIC SMALL LAMDA
        # <font> 03BB greek small letter lamda
1D726   MATHEMATICAL BOLD ITALIC CAPITAL LAMDA
        # <font> 039B greek capital letter lamda
1D740   MATHEMATICAL BOLD ITALIC SMALL LAMDA
        # <font> 03BB greek small letter lamda
1D760   MATHEMATICAL SANS-SERIF BOLD CAPITAL LAMDA
        # <font> 039B greek capital letter lamda
1D77A   MATHEMATICAL SANS-SERIF BOLD SMALL LAMDA
        # <font> 03BB greek small letter lamda
1D79A   MATHEMATICAL SANS-SERIF BOLD ITALIC CAPITAL LAMDA
        # <font> 039B greek capital letter lamda
1D7B4   MATHEMATICAL SANS-SERIF BOLD ITALIC SMALL LAMDA
        # <font> 03BB greek small letter lamda

jan.

2008/11/19 David Menendez <[hidden email]>:

> On Wed, Nov 19, 2008 at 5:24 PM, Duncan Coutts
> <[hidden email]> wrote:
>> On Wed, 2008-11-19 at 15:01 +0000, Tony Finch wrote:
>>> On Wed, 19 Nov 2008, Simon Marlow wrote:
>>> >
>>> > Tue Jan 16 16:11:00 GMT 2007  Simon Marlow <[hidden email]>
>>> >   * 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.
>>>
>>> There are a number of mathematical lambdas in Unicode (distinct from teh
>>> Greek lambdas), but they are not in the basic multilingual plane and they
>>> are presumably not very easy to type :-)
>>
>> Do you know what they are? I couldn't find any other than the greek
>> lambda λ and the latin lambda with stroke ƛ.
>
> They're listed under Mathematical Alphanumeric Symbols.
> <http://www.unicode.org/charts/PDF/U1D400.pdf>
>
> e.g., 1D6CC mathematical bold small lambda
>
>
> --
> Dave Menendez <[hidden email]>
> <http://www.eyrie.org/~zednenem/>
>
> _______________________________________________
> Glasgow-haskell-users mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>
>

_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unicode's greek lambda

Duncan Coutts
On Thu, 2008-11-20 at 09:50 +0000, Jan Jakubuv wrote:
> Some others are (I have no idea why they are referenced as "lamda"
> instead of "lambda"):

Yeah, that's why I missed them. I was searching for what I thought was
the correct spelling.

Duncan

_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unicode's greek lambda

Arnar Birgisson
On Thu, Nov 20, 2008 at 12:23, Duncan Coutts
<[hidden email]> wrote:
> On Thu, 2008-11-20 at 09:50 +0000, Jan Jakubuv wrote:
>> Some others are (I have no idea why they are referenced as "lamda"
>> instead of "lambda"):
>
> Yeah, that's why I missed them. I was searching for what I thought was
> the correct spelling.

Same here. Another problem is font support.. none of the fonts on my
system (and I have quite a lot) have these codepoints defined. One
would have to open them in a font editor and copy the greek lambda.

cheers,
Arnar
_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unicode's greek lambda

Colin Adams-3
I thought it was worth asking David Carlisle about this. Here is his reply:

Colin> I thought I would draw this complaint to your attention, since I think
> you are probably responsible for getting many of these symbols into
> Unicode in the first place.

David>I had no part in not lam(b)da:-) that's been there since the beginning
for greek text not for mathematics. Unicode know that their spelling is
eccentric (and even have a comment to that effect somewhere as I recall)
but the overriding rule is they never change the mames once assigned.


> Another problem is font support.. none of the fonts on my
> system (and I have quite a lot) have these codepoints defined.

David> That seems surprising. Some of the more exotic math characters added at
Unicode 3.2,4,5 are only just now getting into fonts (such as STIX and
Cambria math) but (almost) any truetype or type1 font built in the last
10 years or so should have the basic latin-greek-cyrillic font set, at
least.

David>Whether or not the editor that you are using knows about anything other
than ascii and can actually use the font is another matter of course.


2008/11/20 Arnar Birgisson <[hidden email]>:

> On Thu, Nov 20, 2008 at 12:23, Duncan Coutts
> <[hidden email]> wrote:
>> On Thu, 2008-11-20 at 09:50 +0000, Jan Jakubuv wrote:
>>> Some others are (I have no idea why they are referenced as "lamda"
>>> instead of "lambda"):
>>
>> Yeah, that's why I missed them. I was searching for what I thought was
>> the correct spelling.
>
> Same here. Another problem is font support.. none of the fonts on my
> system (and I have quite a lot) have these codepoints defined. One
> would have to open them in a font editor and copy the greek lambda.
>
> cheers,
> Arnar
> _______________________________________________
> Glasgow-haskell-users mailing list
> [hidden email]
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>
_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unicode's greek lambda

Arnar Birgisson
Hi,

On Thu, Nov 20, 2008 at 18:56, Colin Adams
<[hidden email]> wrote:
>> Another problem is font support.. none of the fonts on my
>> system (and I have quite a lot) have these codepoints defined.
>
> David> That seems surprising. Some of the more exotic math characters added at
> Unicode 3.2,4,5 are only just now getting into fonts (such as STIX and
> Cambria math) but (almost) any truetype or type1 font built in the last
> 10 years or so should have the basic latin-greek-cyrillic font set, at
> least.

To clarify - most of modern fonts do in deed have latin-greek-cyrillic
(including the U+03BB lambda), but I was referring to the specific
math symbols such as the U+1D6CC bold lam(b)da, which reside in the
Supplementary Multilingual Plane (SMP). Those are indeed not present
in my fonts, including Lucida Math and Adobe Mathematical Pi).

cheers,
Arnar
_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reply | Threaded
Open this post in threaded view
|

Re: Unicode's greek lambda

Colin Paul Adams
In reply to this post by Jan Jakubuv-2

    Jan> Some others are (I have no idea why they are referenced as
    Jan> "lamda" instead of "lambda"):

See http://unicode.org/notes/tn27/ :

"U+039B GREEK CAPITAL LETTER LAMDA
U+03BB GREEK SMALL LETTER LAMDA

        * The use of the spelling lamda derives from ISO 10646. This
          does not mean that it is more correct than lambda, merely
          that the spelling without the 'b' is the one used in the
          formal character names."

--
Colin Adams
Preston Lancashire
_______________________________________________
Glasgow-haskell-users mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
12