Haskell Language UnicodeSyntax


Example

An extension that allows you to use Unicode characters in lieu of certain built-in operators and names.

ASCIIUnicodeUse(s)
::has type
->function types, lambdas, case branches, etc.
=>class constraints
forallexplicit polymorphism
<-do notation
*the type (or kind) of types (e.g., Int :: ★)
>-proc notation for Arrows
-<proc notation for Arrows
>>-proc notation for Arrows
-<<proc notation for Arrows

For example:

runST :: (forall s. ST s a) -> a

would become

runST ∷ (∀ s. ST s a) → a

Note that the * vs. example is slightly different: since * isn't reserved, also works the same way as * for multiplication, or any other function named (*), and vice-versa. For example:

ghci> 2 ★ 3
6
ghci> let (*) = (+) in 2 ★ 3
5
ghci> let (★) = (-) in 2 * 3
-1