[Haskell-cafe] Unicode Haskell source -- Yippie!
MigMit
miguelimo38 at yandex.ru
Thu Apr 24 17:22:10 UTC 2014
It's disgusting.
Отправлено с iPhone
> 24 апр. 2014 г., в 21:15, Rustom Mody <rustompmody at gmail.com> написал(а):
>
> I'm mighty pleased to note that the following is valid Haskell code!
>
> Do others find this useful/appealing?
> Any possibilities on making the commented out parts work?
>
> [Pragmatics about typing this at the same speed and facility as we do with Ascii is a separate and (IMHO) solvable problem though its not the case at the moment]
>
>
> --------------------
> import qualified Data.Set as Set
> -- Experimenting with Unicode in Haskell source
>
> -- Numbers
> x ≠ y = x /= y
> x ≤ y = x <= y
> x ≥ y = x >= y
> x ÷ y = divMod x y
> x ⇑ y = x ^ y
>
> x × y = x * y -- readability hmmm !!!
> π = pi
>
> -- ⌊ x = floor x
> -- ⌈ x = ceiling x
>
> -- Lists
> xs ⤚ ys = xs ++ ys
>
> -- Bools
> x ∧ y = x && y
> x ∨ y = y || y
> -- ¬x = not x
>
>
> -- Sets
>
> x ∈ s = x `Set.member` s -- or keep ∈ for list elem?
> s ∪ t = s `Set.union` t
> s ∩ t = s `Set.intersection` t
> s ⊆ t = s `Set.isSubsetOf` t
> s ⊂ t = s `Set.isProperSubsetOf` t
> s ⊈ t = not (s `Set.isSubsetOf` t)
> -- ∅ = Set.null
>
> _______________________________________________
> 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