[Haskell-cafe] Richer (than ascii) notation for haskell source?

Andrew Coppin andrewcoppin at btinternet.com
Wed May 14 14:32:02 EDT 2008


Patrick Surry wrote:
>
> Probably a silly question, but for me one of the nice things about 
> Haskell is that it's a lot like just writing math(s). But in contrast 
> to math you lose a lot of notational flexibility being limited to the 
> ascii character set in your source code.
>
> It would be nice to be able to use a richer set of symbols in your 
> source code for operators and functions (e.g. integral, sum, dot and 
> cross-product, …), as well as variables (the standard upper and 
> lower-case greek for example, along with things like super- and 
> sub-scripting, bold/italic and what-not). You could imagine ending up 
> with source code that reads just like a mathematical paper.
>
> Don't know how I'd actually then write/maintain the source-code - some 
> WYSIWYG editor or effectively writing it in '(la)tex'? Maybe that's 
> what Knuth is on about with his 'literate programming' weave/tangle 
> stuff which I don't know much about - does that translate to Haskell?
>

Personally, I'd just like to be able to get rid of "->", "\" and other 
such hacks. Would it be possible to amend GHC so that it accepts "->" 
and [whatever the Unicode codepoint for "left arrow" is] and treats both 
the same?

IIRC, GHC already accepts Unicode input. I seem to recall some people 
debating what to do about languages that don't have a concept of 
"uppercase" and "lowercase" - the Haskell language critically hinges on 
that distinction. But then, if you wanted to write your Haskell programs 
in arabic or something, I would think the fact that all the language 
keywords and every library ever written are in English, so...



More information about the Haskell-Cafe mailing list