[Haskell-cafe] Re: Float instance of 'read'

Lennart Augustsson lennart at augustsson.net
Wed Sep 17 11:33:31 EDT 2008

Given examples like (1,2,3) I don't see how comma could ever be used
instead of  dot, unless you insist on whitespace around all commas.
And that doesn't look like the right way forward.

  -- Lennart

On Wed, Sep 17, 2008 at 4:20 PM, Mauricio <briqueabraque at yahoo.com> wrote:
>>> Do you think 'read' (actually,
>>> 'readsPrec'?) could be made to also
>>> read the international convention
>>> (ie., read "1,5" would also work
>>> besides read "1.5")? I'm happy to
>>> finaly use a language where I can
>>> use words of my language to name
>>> variables, so I wonder if we could
>>> also make that step.
>> The purpose of 'read' is to read haskell notation, not to read
>> locally-sensitive notation.
>> So the right question to ask is "should we change haskell's lexical syntax
>> to support locally-sensitive number notation".
>> IMO, the answer is no. (...)
> Agree about the answer, not about the question. The
> correct one would be "is it possible to change haskell
> syntax to support the international notation (not any
> locally sensitive one) for decimal real numbers? Would
> a change in 'read' be a good first step?"
> I know this looks difficult, but I'm sure it deserves at
> least some thinking. We have previous examples for
> less important issues: ghc does accept Windows end
> of line conventions, the minus and sign needs special
> syntax, and '.' can be used as decimal separator even
> if it's use as function notation.
> Best,
> Maurício
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list