[Haskell-cafe] Unicode Haskell source -- Yippie!

Roel van Dijk vandijk.roel at gmail.com
Thu Apr 24 19:51:07 UTC 2014


I think it is a nice feature if used sparingly.

Note that while Unicode symbols are a normal part of the Haskell language
you can also turn on some Unicode syntax using the UnicodeSyntax [1]
language extension. This means the following will be accepted by GHC:

(∈) ∷ ∀ α. Eq α ⇒ α → [α] → Bool
(∈) = elem

You might want to take a look at some packages I created that define some
Unicode symbols for common operators and values [2, 3, 4].

Opinions on whether this is a good idea vary. My anecdotal observation is
that it seems to be used more by people who speak a native language that is
already poorly served by ASCII. Perhaps because they are already used to
not being able to simply type every character they need.

1 -
http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#unicode-syntax
2 - http://www.haskell.org/haskellwiki/Unicode-symbols
3 - http://hackage.haskell.org/package/base-unicode-symbols
4 - http://hackage.haskell.org/package/containers-unicode-symbols
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140424/2ed158c6/attachment.html>


More information about the Haskell-Cafe mailing list