packages feed

base-unicode-symbols 0.2.1.1 → 0.2.4.2

raw patch · 29 files changed

Files

− Control/Applicative/Unicode.hs
@@ -1,46 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Control.Applicative.Unicode-Copyright  : (c) 2009–2010 Roel van Dijk-License    : BSD3 (see the file LICENSE)-Maintainer : Roel van Dijk <vandijk.roel@gmail.com>--}--module Control.Applicative.Unicode ( (⊛), (∅) ) where------------------------------------------------------------------------------------- Imports------------------------------------------------------------------------------------ from base:-import Control.Applicative ( Applicative, Alternative, (<*>), empty )------------------------------------------------------------------------------------- Fixities----------------------------------------------------------------------------------infixl 4 ⊛------------------------------------------------------------------------------------- Symbols----------------------------------------------------------------------------------{-|-(&#x229B;) = '<*>'--U+229B, CIRCLED ASTERISK OPERATOR--}-(⊛) ∷ Applicative f ⇒ f (α → β) → f α → f β-(⊛) = (<*>)--{-|-(&#x2205;) = 'empty'--U+2205, EMPTY SET--}-(∅) ∷ Alternative f ⇒ f α-(∅) = empty
− Control/Arrow/Unicode.hs
@@ -1,60 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax, TypeOperators #-}--{-|-Module     : Control.Arrow.Unicode-Copyright  : (c) 2010 Roel van Dijk-License    : BSD3 (see the file LICENSE)-Maintainer : Roel van Dijk <vandijk.roel@gmail.com>--}--module Control.Arrow.Unicode ( (⋙), (⋘), (⁂), (⧻), (⫴) ) where------------------------------------------------------------------------------------- Imports------------------------------------------------------------------------------------ from base:-import Control.Arrow ( Arrow, (***), ArrowChoice, (+++), (|||) )-import Data.Either   ( Either )---- from base-unicode-symbols-import Control.Category.Unicode ( (⋙), (⋘) )------------------------------------------------------------------------------------- Fixities----------------------------------------------------------------------------------infixr 3 ⁂-infixr 2 ⧻-infixr 2 ⫴------------------------------------------------------------------------------------- Symbols----------------------------------------------------------------------------------{-|-(&#x2042;) = ('***')--U+2042, ASTERISM--}-(⁂) ∷ Arrow (⇝) ⇒ (α ⇝ β) → (α' ⇝ β') → (α, α') ⇝ (β, β')-(⁂) = (***)--{-|-(&#x29FB;) = ('+++')--U+29FB, TRIPLE PLUS--}-(⧻) ∷ ArrowChoice (⇝) ⇒ (α ⇝ β) → (α' ⇝ β') → (Either α α' ⇝ Either β β')-(⧻) = (+++)--{-|-(&#x2AF4;) = ('|||')--U+2AF4, TRIPLE VERTICAL BAR BINARY RELATION--}-(⫴) ∷ ArrowChoice (⇝) ⇒ (α ⇝ δ) → (β ⇝ δ) → (Either α β ⇝ δ)-(⫴) = (|||)
− Control/Category/Unicode.hs
@@ -1,55 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax, TypeOperators #-}--{-|-Module     : Control.Category.Unicode-Copyright  : (c) 2009–2010 Roel van Dijk-License    : BSD3 (see the file LICENSE)-Maintainer : Roel van Dijk <vandijk.roel@gmail.com>--}--module Control.Category.Unicode ( (∘), (⋙), (⋘) ) where------------------------------------------------------------------------------------- Imports------------------------------------------------------------------------------------ from base:-import Control.Category ( Category, (.), (>>>), (<<<) )------------------------------------------------------------------------------------- Fixities----------------------------------------------------------------------------------infixr 9 ∘-infixr 1 ⋙, ⋘------------------------------------------------------------------------------------- Symbols----------------------------------------------------------------------------------{-|-(&#x2218;) = ('.')--U+2218, RING OPERATOR--}-(∘) ∷ Category (⇝) ⇒ (β ⇝ γ) → (α ⇝ β) → (α ⇝ γ)-(∘) = (.)--{-|-(&#x22D9;) = ('>>>')--U+22D9, VERY MUCH GREATER-THAN--}-(⋙) ∷ Category (⇝) ⇒ (α ⇝ β) → (β ⇝ γ) → (α ⇝ γ)-(⋙) = (>>>)--{-|-(&#x22D8;) = ('<<<')--U+22D8, VERY MUCH LESS-THAN--}-(⋘) ∷ Category (⇝) ⇒ (β ⇝ γ) → (α ⇝ β) → (α ⇝ γ)-(⋘) = (<<<)
− Control/Monad/Unicode.hs
@@ -1,56 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Control.Monad.Unicode-Copyright  : (c) 2010 Roel van Dijk-License    : BSD3 (see the file LICENSE)-Maintainer : Roel van Dijk <vandijk.roel@gmail.com>--}--module Control.Monad.Unicode ( (≫=), (≫), (=≪) ) where------------------------------------------------------------------------------------- Imports------------------------------------------------------------------------------------ from base:-import Control.Monad ( Monad, (>>=), (>>), (=<<) )------------------------------------------------------------------------------------- Fixities----------------------------------------------------------------------------------infixl 1 ≫=-infixl 1 ≫-infixr 1 =≪------------------------------------------------------------------------------------- Symbols----------------------------------------------------------------------------------{-|-(&#x226B;=) = ('>>=')--(U+226B, MUCH GREATER-THAN) + (U+3D, EQUALS SIGN)--}-(≫=) ∷ Monad m ⇒ m α → (α → m β) → m β-(≫=) = (>>=)--{-|-(&#x226B;) = ('>>')--U+226B, MUCH GREATER-THAN--}-(≫) ∷ Monad m ⇒ m α → m β → m β-(≫) = (>>)--{-|-(=&#x226A;) = ('=<<')--(U+3D, EQUALS SIGN) + (U+226A, MUCH LESS-THAN)--}-(=≪) ∷ Monad m ⇒ (α → m β) → m α → m β-(=≪) = (=<<)
− Data/Bool/Unicode.hs
@@ -1,55 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Data.Bool.Unicode-Copyright  : (c) 2009–2010 Roel van Dijk-License    : BSD3 (see the file LICENSE)-Maintainer : Roel van Dijk <vandijk.roel@gmail.com>--}--module Data.Bool.Unicode ( (∧), (∨), (¬) ) where------------------------------------------------------------------------------------- Imports------------------------------------------------------------------------------------ from base:-import Data.Bool ( Bool, (&&), (||), not )------------------------------------------------------------------------------------- Fixities----------------------------------------------------------------------------------infixr 2 ∨-infixr 3 ∧------------------------------------------------------------------------------------- Symbols----------------------------------------------------------------------------------{-|-(&#x00AC;) = 'not'--U+00AC, NOT SIGN--}-(¬) ∷ Bool → Bool-(¬) = not--{-|-(&#x2227;) = ('&&')--U+2227, LOGICAL AND--}-(∧) ∷ Bool → Bool → Bool-(∧) = (&&)--{-|-(&#x2228;) = ('||')--U+2228, LOGICAL OR--}-(∨) ∷ Bool → Bool → Bool-(∨) = (||)
− Data/Eq/Unicode.hs
@@ -1,56 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Data.Eq.Unicode-Copyright  : (c) 2009–2010 Roel van Dijk-License    : BSD3 (see the file LICENSE)-Maintainer : Roel van Dijk <vandijk.roel@gmail.com>--}--module Data.Eq.Unicode ( (≡), (≢), (≠) ) where------------------------------------------------------------------------------------- Imports------------------------------------------------------------------------------------ from base:-import Data.Bool ( Bool )-import Data.Eq   ( Eq, (==), (/=) )------------------------------------------------------------------------------------- Fixities----------------------------------------------------------------------------------infix  4 ≡-infix  4 ≢-infix  4 ≠------------------------------------------------------------------------------------ Symbols----------------------------------------------------------------------------------{-|-(&#x2261;) = ('==')--U+2261, IDENTICAL TO--}-(≡) ∷ Eq α ⇒ α → α → Bool-(≡) = (==)--{-|-(&#x2262;) = ('/=')--U+2262, NOT IDENTICAL TO--}-(≢) ∷ Eq α ⇒ α → α → Bool-(≢) = (/=)--{-|-(&#x2260;) = ('/=')--U+2260, NOT EQUAL TO--}-(≠) ∷ Eq α ⇒ α → α → Bool-(≠) = (/=)
− Data/Foldable/Unicode.hs
@@ -1,68 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Data.Foldable.Unicode-Copyright  : (c) 2009–2010 Roel van Dijk-License    : BSD3 (see the file LICENSE)-Maintainer : Roel van Dijk <vandijk.roel@gmail.com>--}--module Data.Foldable.Unicode where------------------------------------------------------------------------------------- Imports------------------------------------------------------------------------------------ from base:-import Data.Bool     ( Bool )-import Data.Eq       ( Eq )-import Data.Function ( flip )-import Data.Foldable ( Foldable, elem, notElem )------------------------------------------------------------------------------------- Fixities----------------------------------------------------------------------------------infix  4 ∈-infix  4 ∋-infix  4 ∉-infix  4 ∌------------------------------------------------------------------------------------- Symbols----------------------------------------------------------------------------------{-|-(&#x2208;) = 'elem'--U+2208, ELEMENT OF--}-(∈) ∷ (Foldable t, Eq α) ⇒ α → t α → Bool-(∈) = elem--{-|-(&#x220B;) = 'flip' (&#x2208;)--U+220B, CONTAINS AS MEMBER--}-(∋) ∷ (Foldable t, Eq α) ⇒ t α → α → Bool-(∋) = flip (∈)--{-|-(&#x2209;) = 'notElem'--U+2209, NOT AN ELEMENT OF--}-(∉) ∷ (Foldable t, Eq α) ⇒ α → t α → Bool-(∉) = notElem--{-|-(&#x220C;) = 'flip' (&#x2209;)--U+220C, DOES NOT CONTAIN AS MEMBER--}-(∌) ∷ (Foldable t, Eq α) ⇒ t α → α → Bool-(∌) = flip (∉)
− Data/Function/Unicode.hs
@@ -1,38 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Data.Function.Unicode-Copyright  : (c) 2009–2010 Roel van Dijk-License    : BSD3 (see the file LICENSE)-Maintainer : Roel van Dijk <vandijk.roel@gmail.com>--}--module Data.Function.Unicode ( (∘) ) where------------------------------------------------------------------------------------- Imports------------------------------------------------------------------------------------ from base:-import Data.Function ( (.) )------------------------------------------------------------------------------------- Fixities----------------------------------------------------------------------------------infixr 9 ∘------------------------------------------------------------------------------------- Symbols----------------------------------------------------------------------------------{-|-(&#x2218;) = ('.')--U+2218, RING OPERATOR--}-(∘) ∷ (β → γ) → (α → β) → (α → γ)-(∘) = (.)
− Data/List/Unicode.hs
@@ -1,119 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Data.List.Unicode-Copyright  : (c) 2009–2010 Roel van Dijk-License    : BSD3 (see the file LICENSE)-Maintainer : Roel van Dijk <vandijk.roel@gmail.com>--}--module Data.List.Unicode-    ( (⧺)-    , (∈), (∋), (∉), (∌)-    , (∪), (∖), (∆), (∩)-    ) where------------------------------------------------------------------------------------- Imports------------------------------------------------------------------------------------ from base:-import Data.Bool     ( Bool )-import Data.Eq       ( Eq )-import Data.Function ( flip )-import Data.List     ( (++), elem, notElem, union, (\\), intersect )------------------------------------------------------------------------------------- Fixities----------------------------------------------------------------------------------infix  4 ∈-infix  4 ∋-infix  4 ∉-infix  4 ∌-infixr 5 ⧺-infixl 6 ∪-infixr 6 ∩-infixl 9 ∖-infixl 9 ∆------------------------------------------------------------------------------------- Symbols----------------------------------------------------------------------------------{-|-(&#x29FA;) = ('++')--U+29FA, DOUBLE PLUS--}-(⧺) ∷ [α] → [α] → [α]-(⧺) = (++)--{-|-(&#x2208;) = 'elem'--U+2208, ELEMENT OF--}-(∈) ∷ Eq α ⇒ α → [α] → Bool-(∈) = elem--{-|-(&#x220B;) = 'flip' (&#x2208;)--U+220B, CONTAINS AS MEMBER--}-(∋) ∷ Eq α ⇒ [α] → α → Bool-(∋) = flip (∈)--{-|-(&#x2209;) = 'notElem'--U+2209, NOT AN ELEMENT OF--}-(∉) ∷ Eq α ⇒ α → [α] → Bool-(∉) = notElem--{-|-(&#x220C;) = 'flip' (&#x2209;)--U+220C, DOES NOT CONTAIN AS MEMBER--}-(∌) ∷ Eq α ⇒ [α] → α → Bool-(∌) = flip (∉)--{-|-(&#x222A;) = 'union'--U+222A, UNION--}-(∪) ∷ Eq α ⇒ [α] → [α] → [α]-(∪) = union--{-|-(&#x2216;) = ('\\')--U+2216, SET MINUS--}-(∖) ∷ Eq α ⇒ [α] → [α] → [α]-(∖) = (\\)--{-|-Symmetric difference--a &#x2206; b = (a &#x2216; b) &#x222A; (b &#x2216; a)--U+2206, INCREMENT--}-(∆) ∷ Eq α ⇒ [α] → [α] → [α]-a ∆ b = (a ∖ b) ∪ (b ∖ a)--{-|-(&#x2229;) = 'intersect'--U+2229, INTERSECTION--}-(∩) ∷ Eq α ⇒ [α] → [α] → [α]-(∩) = intersect
− Data/Monoid/Unicode.hs
@@ -1,47 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Data.Monoid.Unicode-Copyright  : (c) 2009–2010 Roel van Dijk-License    : BSD3 (see the file LICENSE)-Maintainer : Roel van Dijk <vandijk.roel@gmail.com>--}--module Data.Monoid.Unicode ( (∅), (⊕) ) where------------------------------------------------------------------------------------- Imports------------------------------------------------------------------------------------ from base:-import Data.Monoid ( Monoid, mempty, mappend )------------------------------------------------------------------------------------- Fixities----------------------------------------------------------------------------------infixr 6 ⊕------------------------------------------------------------------------------------- Symbols----------------------------------------------------------------------------------{-|-(&#x2205;) = 'mempty'--U+2205, EMPTY SET--}-(∅) ∷ Monoid α ⇒ α-(∅) = mempty--{-|-(&#x2295;) = 'mappend'--U+2295, CIRCLED PLUS--}-(⊕) ∷ Monoid α ⇒ α → α → α-(⊕) = mappend-
− Data/Ord/Unicode.hs
@@ -1,66 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Data.Ord.Unicode-Copyright  : (c) 2009–2010 Roel van Dijk-License    : BSD3 (see the file LICENSE)-Maintainer : Roel van Dijk <vandijk.roel@gmail.com>--}--module Data.Ord.Unicode ( (≤), (≥), (≮), (≯) ) where------------------------------------------------------------------------------------- Imports------------------------------------------------------------------------------------ from base:-import Data.Bool ( Bool )-import Data.Ord  ( Ord, (<=), (>=) )------------------------------------------------------------------------------------- Fixities----------------------------------------------------------------------------------infix  4 ≤-infix  4 ≥-infix  4 ≮-infix  4 ≯------------------------------------------------------------------------------------- Symbols----------------------------------------------------------------------------------{-|-(&#x2264;) = ('<=')--U+2264, LESS-THAN OR EQUAL TO--}-(≤) ∷ Ord α ⇒ α → α → Bool-(≤) = (<=)--{-|-(&#x2265;) = ('>=')--U+2265, GREATER-THAN OR EQUAL TO--}-(≥) ∷ Ord α ⇒ α → α → Bool-(≥) = (>=)--{-|-(&#x226E;) = ('>=')--U+226E, NOT LESS-THAN--}-(≮) ∷ Ord α ⇒ α → α → Bool-(≮) = (>=)--{-|-(&#x226F;) = ('<=')--U+226F, NOT GREATER-THAN--}-(≯) ∷ Ord α ⇒ α → α → Bool-(≯) = (<=)
LICENSE view
@@ -1,4 +1,4 @@-Copyright (c) 2009–2010 Roel van Dijk+Copyright 2009–2019 Roel van Dijk  All rights reserved. 
− Prelude/Unicode.hs
@@ -1,82 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Prelude.Unicode-Copyright  : (c) 2009–2010 Roel van Dijk-License    : BSD3 (see the file LICENSE)-Maintainer : Roel van Dijk <vandijk.roel@gmail.com>--}--module Prelude.Unicode-    ( (¬), (∧), (∨)-    , (≡), (≢), (≠)-    , (≤), (≥), (≮), (≯)-    , π-    , (÷), (⋅)-    , (∘)-    , (⧺)-    , (∈), (∉)-    , (⊥)-    ) where------------------------------------------------------------------------------------- Imports------------------------------------------------------------------------------------ from base:-import Prelude ( Num, Floating, Fractional-               , (/), (*), pi, undefined-               )---- from base-unicode-symbols:-import Data.Bool.Unicode     ( (∧), (∨), (¬) )-import Data.Eq.Unicode       ( (≡), (≢), (≠) )-import Data.Function.Unicode ( (∘) )-import Data.List.Unicode     ( (⧺), (∈), (∉) )-import Data.Ord.Unicode      ( (≤), (≥), (≮), (≯) )------------------------------------------------------------------------------------- Fixities----------------------------------------------------------------------------------infixl 7 ÷-infixl 7 ⋅------------------------------------------------------------------------------------- Symbols----------------------------------------------------------------------------------{-|-&#x03C0; = 'pi'--U+03C0, GREEK SMALL LETTER PI--}-π ∷ Floating α ⇒ α-π = pi--{-|-(&#x00F7;) = ('/')--U+00F7, DIVISION SIGN--}-(÷) ∷ Fractional α ⇒ α → α → α-(÷) = (/)--{-|-(&#x22C5;) = ('*')--U+22C5, DOT OPERATOR--}-(⋅) ∷ Num α ⇒ α → α → α-(⋅) = (*)--{-|-(&#x22A5;) = 'undefined'--U+22A5, UP TACK--}-(⊥) ∷ α-(⊥) = undefined
+ README.markdown view
@@ -0,0 +1,23 @@+This package defines Unicode symbol aliases for a number of functions+and operators in the `base` package of the Haskell standard library.+Many of these aliases enable the use of standard mathematical notation+in place of ASCII approximations or textual names.  For example, `(∧)`+(U+2227 LOGICAL AND) can be used in place of `(&&)` for boolean AND.++All symbols are documented with their actual definition and their+Unicode code point. They should be completely interchangeable with+their definitions.++# Versus the `UnicodeSyntax` language extension++This library only provides Unicode aliases for *library* functions.+If you want to use Unicode symbols for core language tokens, also+enable the+[`UnicodeSyntax`](https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#unicode-syntax)+language extension. This extension enables Unicode characters to be+used to stand for certain ASCII character sequences, i.e. `→` instead+of `->`, `∀` instead of `forall` and many others.++# Credits++Original idea by Péter Diviánszky.
base-unicode-symbols.cabal view
@@ -1,51 +1,64 @@ name:          base-unicode-symbols-version:       0.2.1.1+version:       0.2.4.2 cabal-version: >=1.6 build-type:    Simple stability:     provisional-author:        Roel van Dijk <vandijk.roel@gmail.com>-maintainer:    Roel van Dijk <vandijk.roel@gmail.com>-copyright:     (c) 2009–2010 Roel van Dijk <vandijk.roel@gmail.com>+author:        Roel van Dijk <roel@lambdacube.nl>+maintainer:    Roel van Dijk <roel@lambdacube.nl>+copyright:     2009–2019 Roel van Dijk <roel@lambdacube.nl> license:       BSD3 license-file:  LICENSE category: homepage:      http://haskell.org/haskellwiki/Unicode-symbols+bug-reports:   https://github.com/roelvandijk/base-unicode-symbols/issues synopsis:      Unicode alternatives for common functions and operators description:-  This package defines new symbols for a number of functions and-  operators in the base package.+  This package defines new symbols for a number of functions,+  operators and types in the base package.   .   All symbols are documented with their actual definition and   information regarding their Unicode code point. They should be   completely interchangeable with their definitions.   .   For further Unicode goodness you can enable the @UnicodeSyntax@-  language extension \[1\]. This extension enables Unicode characters-  to be used to stand for certain ASCII character sequences. For GHC-  6.12.3 it provides the following alternatives:-  .-  * &#x2237; (U+2237, PROPORTION) instead of @::@-  .-  * &#x21D2; (U+21D2, RIGHTWARDS DOUBLE ARROW) instead of @=>@-  .-  * &#x2200; (U+2200, FOR ALL) instead of @forall@-  .-  * &#x2192; (U+2192, RIGHTWARDS ARROW) instead of @->@-  .-  * &#x2190; (U+2190, LEFTWARDS ARROW) instead of @<-@+  language extension [1]. This extension enables Unicode characters+  to be used to stand for certain ASCII character sequences,+  i.e. &#x2192; instead of @->@, &#x2200; instead of @forall@ and many+  others.   .   Original idea by P&#xE9;ter Divi&#xE1;nszky.   .-  \[1\] <http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#unicode-syntax>+  \[1] <https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#unicode-syntax> +extra-source-files: LICENSE, README.markdown+ source-repository head-  type:     darcs-  location: http://code.haskell.org/~roelvandijk/code/base-unicode-symbols+  type:     git+  location: git://github.com/roelvandijk/base-unicode-symbols.git +flag old-base+  description: Support for base < 3.0.3.1+  default: False++flag base-4-8+  description: Support features of base >= 4.8.0.0+  default: True+ library+  hs-source-dirs: src+  ghc-options: -Wall++  if flag(old-base)+    build-depends: base >= 3.0 && < 3.0.3.1+  else+    exposed-modules: Control.Category.Unicode+    if flag(base-4-8)+      build-depends: base >= 4.8.0.0 && < 5+      exposed-modules: Numeric.Natural.Unicode+    else+      build-depends: base >= 3.0.3.1 && < 5   exposed-modules: Control.Applicative.Unicode                  , Control.Arrow.Unicode-                 , Control.Category.Unicode                  , Control.Monad.Unicode                  , Data.Bool.Unicode                  , Data.Eq.Unicode@@ -54,5 +67,5 @@                  , Data.List.Unicode                  , Data.Monoid.Unicode                  , Data.Ord.Unicode+                 , Data.String.Unicode                  , Prelude.Unicode-  build-depends: base >= 3.0.3.1 && < 4.4
+ src/Control/Applicative/Unicode.hs view
@@ -0,0 +1,40 @@+{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}++module Control.Applicative.Unicode ( (⊛), (∅) ) where++-------------------------------------------------------------------------------+-- Imports+-------------------------------------------------------------------------------++-- from base:+import Control.Applicative ( Applicative, Alternative, (<*>), empty )+++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infixl 4 ⊛+++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------++{-|+(&#x229B;) = '<*>'++U+229B, CIRCLED ASTERISK OPERATOR+-}+(⊛) ∷ Applicative f ⇒ f (α → β) → f α → f β+(⊛) = (<*>)+{-# INLINE (⊛) #-}++{-|+(&#x2205;) = 'empty'++U+2205, EMPTY SET+-}+(∅) ∷ Alternative f ⇒ f α+(∅) = empty+{-# INLINE (∅) #-}
+ src/Control/Arrow/Unicode.hs view
@@ -0,0 +1,94 @@+{-# LANGUAGE CPP, NoImplicitPrelude, UnicodeSyntax, TypeOperators #-}++module Control.Arrow.Unicode+    ( (⋙)+    , (⋘)+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ > 608+    , (⁂)+#endif+    , (⧻)+    , (⫴)+    ) where++-------------------------------------------------------------------------------+-- Imports+-------------------------------------------------------------------------------++-- from base:+import Control.Arrow ( Arrow, (***), ArrowChoice, (+++), (|||) )+import Data.Either   ( Either )++#if (MIN_VERSION_base(3,0,3))+-- from base-unicode-symbols+import Control.Category.Unicode ( (⋙), (⋘) )+#else+import Control.Arrow ( (>>>), (<<<) )+#endif+++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ > 608+infixr 3 ⁂+#endif+infixr 2 ⧻+infixr 2 ⫴+#if ! (MIN_VERSION_base(3,0,3))+infixr 1 ⋙, ⋘+#endif+++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------++#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ > 608+{-|+(&#x2042;) = ('***')++U+2042, ASTERISM+-}+(⁂) ∷ Arrow a ⇒ a α β → a α' β' → a (α, α') (β, β')+(⁂) = (***)+{-# INLINE (⁂) #-}+#endif++{-|+(&#x29FB;) = ('+++')++U+29FB, TRIPLE PLUS+-}+(⧻) ∷ ArrowChoice a ⇒ a α β → a α' β' → a (Either α α') (Either β β')+(⧻) = (+++)+{-# INLINE (⧻) #-}++{-|+(&#x2AF4;) = ('|||')++U+2AF4, TRIPLE VERTICAL BAR BINARY RELATION+-}+(⫴) ∷ ArrowChoice a ⇒ a α δ → a β δ → a (Either α β) δ+(⫴) = (|||)+{-# INLINE (⫴) #-}++#if ! (MIN_VERSION_base(3,0,3))+{-|+(&#x22D9;) = ('>>>')++U+22D9, VERY MUCH GREATER-THAN+-}+(⋙) ∷ Arrow a ⇒ a α β → a β γ → a α γ+(⋙) = (>>>)+{-# INLINE (⋙) #-}++{-|+(&#x22D8;) = ('<<<')++U+22D8, VERY MUCH LESS-THAN+-}+(⋘) ∷ Arrow a ⇒ a β γ → a α β → a α γ+(⋘) = (<<<)+{-# INLINE (⋘) #-}+#endif
+ src/Control/Category/Unicode.hs view
@@ -0,0 +1,50 @@+{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}++module Control.Category.Unicode ( (∘), (⋙), (⋘) ) where++-------------------------------------------------------------------------------+-- Imports+-------------------------------------------------------------------------------++-- from base:+import Control.Category ( Category, (.), (>>>), (<<<) )+++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infixr 9 ∘+infixr 1 ⋙, ⋘+++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------++{-|+(&#x2218;) = ('.')++U+2218, RING OPERATOR+-}+(∘) ∷ Category c ⇒ c β γ → c α β → c α γ+(∘) = (.)+{-# INLINE (∘) #-}++{-|+(&#x22D9;) = ('>>>')++U+22D9, VERY MUCH GREATER-THAN+-}+(⋙) ∷ Category c ⇒ c α β → c β γ → c α γ+(⋙) = (>>>)+{-# INLINE (⋙) #-}++{-|+(&#x22D8;) = ('<<<')++U+22D8, VERY MUCH LESS-THAN+-}+(⋘) ∷ Category c ⇒ c β γ → c α β → c α γ+(⋘) = (<<<)+{-# INLINE (⋘) #-}
+ src/Control/Monad/Unicode.hs view
@@ -0,0 +1,72 @@+{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}++module Control.Monad.Unicode ( (≫=), (≫), (=≪), (↣), (↢) ) where++-------------------------------------------------------------------------------+-- Imports+-------------------------------------------------------------------------------++-- from base:+import Control.Monad ( Monad, (>>=), (>>), (=<<), (>=>), (<=<) )+++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infixl 1 ≫=+infixl 1 ≫+infixr 1 =≪+infixl 1 ↣+infixr 1 ↢++++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------++{-|+(&#x226B;=) = ('>>=')++(U+226B, MUCH GREATER-THAN) + (U+3D, EQUALS SIGN)+-}+(≫=) ∷ Monad m ⇒ m α → (α → m β) → m β+(≫=) = (>>=)+{-# INLINE (≫=) #-}++{-|+(&#x226B;) = ('>>')++U+226B, MUCH GREATER-THAN+-}+(≫) ∷ Monad m ⇒ m α → m β → m β+(≫) = (>>)+{-# INLINE (≫) #-}++{-|+(=&#x226A;) = ('=<<')++(U+3D, EQUALS SIGN) + (U+226A, MUCH LESS-THAN)+-}+(=≪) ∷ Monad m ⇒ (α → m β) → m α → m β+(=≪) = (=<<)+{-# INLINE (=≪) #-}++{-|+(&#x21a3;) = ('>=>')++(U+21A3, RIGHTWARDS ARROW WITH TAIL)+-}+(↣) ∷ Monad μ ⇒ (α → μ β) → (β → μ γ) → α → μ γ+(↣) = (>=>)+{-# INLINE (↣) #-}++{-|+(&#x21a2;) = ('<=<')++(U+21A2, LEFTWARDS ARROW WITH TAIL)+-}+(↢) ∷ Monad μ ⇒ (β → μ γ) → (α → μ β) → α → μ γ+(↢) = (<=<)+{-# INLINE (↢) #-}
+ src/Data/Bool/Unicode.hs view
@@ -0,0 +1,79 @@+{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}++module Data.Bool.Unicode ( (∧), (∨), (¬), (⊻), (⊼), (⊽) ) where++-------------------------------------------------------------------------------+-- Imports+-------------------------------------------------------------------------------++-- from base:+import Data.Bool ( Bool, (&&), (||), not )++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infixr 2 ∨+infixr 3 ⊽+infixr 3 ⊼+infixr 3 ⊻+infixr 3 ∧+++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------++{-|+(&#x00AC;) = 'not'++U+00AC, NOT SIGN+-}+(¬) ∷ Bool → Bool+(¬) = not+{-# INLINE (¬) #-}++{-|+(&#x2227;) = ('&&')++U+2227, LOGICAL AND+-}+(∧) ∷ Bool → Bool → Bool+(∧) = (&&)+{-# INLINE (∧) #-}++{-|+(&#x2228;) = ('||')++U+2228, LOGICAL OR+-}+(∨) ∷ Bool → Bool → Bool+(∨) = (||)+{-# INLINE (∨) #-}++{-|+a &#x22bb; b = (a &#x2228; b) &#x2227; not (a &#x2227; b)++U+22BB, XOR+-}+(⊻) ∷ Bool → Bool → Bool+a ⊻ b = (a || b) && not (a && b)+{-# INLINE (⊻) #-}++{-|+a &#x22bc; b = not (a &#x2227; b)++U+22bc, NAND+-}+(⊼) ∷ Bool → Bool → Bool+a ⊼ b = not (a && b)+{-# INLINE (⊼) #-}++{-|+a &#x22bd; b = not (a &#x2228; b)++U+22bd, NOR+-}+(⊽) ∷ Bool → Bool → Bool+a ⊽ b = not (a || b)+{-# INLINE (⊽) #-}
+ src/Data/Eq/Unicode.hs view
@@ -0,0 +1,51 @@+{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}++module Data.Eq.Unicode ( (≡), (≢), (≠) ) where++-------------------------------------------------------------------------------+-- Imports+-------------------------------------------------------------------------------++-- from base:+import Data.Bool ( Bool )+import Data.Eq   ( Eq, (==), (/=) )+++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infix  4 ≡+infix  4 ≢+infix  4 ≠++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------++{-|+(&#x2261;) = ('==')++U+2261, IDENTICAL TO+-}+(≡) ∷ Eq α ⇒ α → α → Bool+(≡) = (==)+{-# INLINE (≡) #-}++{-|+(&#x2262;) = ('/=')++U+2262, NOT IDENTICAL TO+-}+(≢) ∷ Eq α ⇒ α → α → Bool+(≢) = (/=)+{-# INLINE (≢) #-}++{-|+(&#x2260;) = ('/=')++U+2260, NOT EQUAL TO+-}+(≠) ∷ Eq α ⇒ α → α → Bool+(≠) = (/=)+{-# INLINE (≠) #-}
+ src/Data/Foldable/Unicode.hs view
@@ -0,0 +1,64 @@+{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}++module Data.Foldable.Unicode where++-------------------------------------------------------------------------------+-- Imports+-------------------------------------------------------------------------------++-- from base:+import Data.Bool     ( Bool )+import Data.Eq       ( Eq )+import Data.Function ( flip )+import Data.Foldable ( Foldable, elem, notElem )+++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infix  4 ∈+infix  4 ∋+infix  4 ∉+infix  4 ∌+++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------++{-|+(&#x2208;) = 'elem'++U+2208, ELEMENT OF+-}+(∈) ∷ (Foldable t, Eq α) ⇒ α → t α → Bool+(∈) = elem+{-# INLINE (∈) #-}++{-|+(&#x220B;) = 'flip' (&#x2208;)++U+220B, CONTAINS AS MEMBER+-}+(∋) ∷ (Foldable t, Eq α) ⇒ t α → α → Bool+(∋) = flip (∈)+{-# INLINE (∋) #-}++{-|+(&#x2209;) = 'notElem'++U+2209, NOT AN ELEMENT OF+-}+(∉) ∷ (Foldable t, Eq α) ⇒ α → t α → Bool+(∉) = notElem+{-# INLINE (∉) #-}++{-|+(&#x220C;) = 'flip' (&#x2209;)++U+220C, DOES NOT CONTAIN AS MEMBER+-}+(∌) ∷ (Foldable t, Eq α) ⇒ t α → α → Bool+(∌) = flip (∉)+{-# INLINE (∌) #-}
+ src/Data/Function/Unicode.hs view
@@ -0,0 +1,31 @@+{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}++module Data.Function.Unicode ( (∘) ) where++-------------------------------------------------------------------------------+-- Imports+-------------------------------------------------------------------------------++-- from base:+import Data.Function ( (.) )+++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infixr 9 ∘+++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------++{-|+(&#x2218;) = ('.')++U+2218, RING OPERATOR+-}+(∘) ∷ (β → γ) → (α → β) → (α → γ)+(∘) = (.)+{-# INLINE (∘) #-}
+ src/Data/List/Unicode.hs view
@@ -0,0 +1,143 @@+{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}++module Data.List.Unicode+    ( (⧺)+    , (∈), (∋), (∉), (∌)+    , (∪), (∖), (∆), (∩)+    , (‼)+    , 𝜀+    ) where++-------------------------------------------------------------------------------+-- Imports+-------------------------------------------------------------------------------++-- from base:+import Prelude       ( Int )+import Data.Bool     ( Bool )+import Data.Eq       ( Eq )+import Data.Function ( flip )+import Data.List     ( (++), elem, notElem, union, (\\), intersect, (!!) )+++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infix  4 ∈+infix  4 ∋+infix  4 ∉+infix  4 ∌+infixr 5 ⧺+infixl 6 ∪+infixr 6 ∩+infixl 9 ∖+infixl 9 ∆+infixl 9 ‼+++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------++{-|+(&#x29FA;) = ('++')++U+29FA, DOUBLE PLUS+-}+(⧺) ∷ [α] → [α] → [α]+(⧺) = (++)+{-# INLINE (⧺) #-}++{-|+(&#x2208;) = 'elem'++U+2208, ELEMENT OF+-}+(∈) ∷ Eq α ⇒ α → [α] → Bool+(∈) = elem+{-# INLINE (∈) #-}++{-|+(&#x220B;) = 'flip' (&#x2208;)++U+220B, CONTAINS AS MEMBER+-}+(∋) ∷ Eq α ⇒ [α] → α → Bool+(∋) = flip (∈)+{-# INLINE (∋) #-}++{-|+(&#x2209;) = 'notElem'++U+2209, NOT AN ELEMENT OF+-}+(∉) ∷ Eq α ⇒ α → [α] → Bool+(∉) = notElem+{-# INLINE (∉) #-}++{-|+(&#x220C;) = 'flip' (&#x2209;)++U+220C, DOES NOT CONTAIN AS MEMBER+-}+(∌) ∷ Eq α ⇒ [α] → α → Bool+(∌) = flip (∉)+{-# INLINE (∌) #-}++{-|+(&#x222A;) = 'union'++U+222A, UNION+-}+(∪) ∷ Eq α ⇒ [α] → [α] → [α]+(∪) = union+{-# INLINE (∪) #-}++{-|+(&#x2216;) = ('\\')++U+2216, SET MINUS+-}+(∖) ∷ Eq α ⇒ [α] → [α] → [α]+(∖) = (\\)+{-# INLINE (∖) #-}++{-|+Symmetric difference++a &#x2206; b = (a &#x2216; b) &#x222A; (b &#x2216; a)++U+2206, INCREMENT+-}+(∆) ∷ Eq α ⇒ [α] → [α] → [α]+a ∆ b = (a ∖ b) ∪ (b ∖ a)+{-# INLINE (∆) #-}++{-|+(&#x2229;) = 'intersect'++U+2229, INTERSECTION+-}+(∩) ∷ Eq α ⇒ [α] → [α] → [α]+(∩) = intersect+{-# INLINE (∩) #-}++{-|+(&#x203C;) = ('!!')++U+203C, DOUBLE EXCLAMATION MARK+-}+(‼) ∷ [α] → Int → α+(‼) = (!!)+{-# INLINE (‼) #-}++{-|+Epsilon, the empty word (or list)++(&#x3b5;) = []++(U+3B5, GREEK SMALL LETTER EPSILON)+-}+𝜀 ∷ [a]+𝜀 = []
+ src/Data/Monoid/Unicode.hs view
@@ -0,0 +1,40 @@+{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}++module Data.Monoid.Unicode ( (∅), (⊕) ) where++-------------------------------------------------------------------------------+-- Imports+-------------------------------------------------------------------------------++-- from base:+import Data.Monoid ( Monoid, mempty, mappend )+++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infixr 6 ⊕+++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------++{-|+(&#x2205;) = 'mempty'++U+2205, EMPTY SET+-}+(∅) ∷ Monoid α ⇒ α+(∅) = mempty+{-# INLINE (∅) #-}++{-|+(&#x2295;) = 'mappend'++U+2295, CIRCLED PLUS+-}+(⊕) ∷ Monoid α ⇒ α → α → α+(⊕) = mappend+{-# INLINE (⊕) #-}
+ src/Data/Ord/Unicode.hs view
@@ -0,0 +1,62 @@+{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}++module Data.Ord.Unicode ( (≤), (≥), (≮), (≯) ) where++-------------------------------------------------------------------------------+-- Imports+-------------------------------------------------------------------------------++-- from base:+import Data.Bool ( Bool )+import Data.Ord  ( Ord, (<=), (>=) )+++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infix  4 ≤+infix  4 ≥+infix  4 ≮+infix  4 ≯+++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------++{-|+(&#x2264;) = ('<=')++U+2264, LESS-THAN OR EQUAL TO+-}+(≤) ∷ Ord α ⇒ α → α → Bool+(≤) = (<=)+{-# INLINE (≤) #-}++{-|+(&#x2265;) = ('>=')++U+2265, GREATER-THAN OR EQUAL TO+-}+(≥) ∷ Ord α ⇒ α → α → Bool+(≥) = (>=)+{-# INLINE (≥) #-}++{-|+(&#x226E;) = ('>=')++U+226E, NOT LESS-THAN+-}+(≮) ∷ Ord α ⇒ α → α → Bool+(≮) = (>=)+{-# INLINE (≮) #-}++{-|+(&#x226F;) = ('<=')++U+226F, NOT GREATER-THAN+-}+(≯) ∷ Ord α ⇒ α → α → Bool+(≯) = (<=)+{-# INLINE (≯) #-}
+ src/Data/String/Unicode.hs view
@@ -0,0 +1,5 @@+{-# LANGUAGE UnicodeSyntax #-}++module Data.String.Unicode (𝜀) where++import Data.List.Unicode (𝜀)
+ src/Numeric/Natural/Unicode.hs view
@@ -0,0 +1,10 @@+{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}++module Numeric.Natural.Unicode ( ℕ ) where++import Numeric.Natural ( Natural )++{-|+U+2115, DOUBLE-STRUCK CAPITAL N+-}+type ℕ = Natural
+ src/Prelude/Unicode.hs view
@@ -0,0 +1,139 @@+{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}++module Prelude.Unicode+    ( (¬), (∧), (∨)+    , (≡), (≢), (≠)+    , (≤), (≥), (≮), (≯)+    , (−)+    , π+    , (÷), (×), (⋅)+    , (∘)+    , (⧺)+    , (∈), (∉)+    , (‼)+    , (⊥)+    , (∣), (∤)+    , ℤ, ℚ+    , 𝜀+    ) where++-------------------------------------------------------------------------------+-- Imports+-------------------------------------------------------------------------------++-- from base:+import Data.Bool ( Bool )+import Data.Eq ( (==) )+import Data.Ratio ( Ratio )+import Prelude    ( Num, Floating, Fractional, Integer, Integral+                  , (-), (/), (*), pi, undefined, mod+                  )++-- from base-unicode-symbols:+import Data.Bool.Unicode     ( (∧), (∨), (¬) )+import Data.Eq.Unicode       ( (≡), (≢), (≠) )+import Data.Function.Unicode ( (∘) )+import Data.List.Unicode     ( (⧺), (∈), (∉), (‼), 𝜀 )+import Data.Ord.Unicode      ( (≤), (≥), (≮), (≯) )+++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infixl 7 ÷+infixl 7 ×, ⋅+infixl 6 −+infix 4 ∣+infix 4 ∤+++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------++{-|+&#x03C0; = 'pi'++U+03C0, GREEK SMALL LETTER PI+-}+π ∷ Floating α ⇒ α+π = pi+{-# INLINE π #-}++{-|+(&#x00F7;) = ('/')++U+00F7, DIVISION SIGN+-}+(÷) ∷ Fractional α ⇒ α → α → α+(÷) = (/)+{-# INLINE (÷) #-}++{-|+(&#x00D7;) = ('*')++U+00D7, MULTIPLICATION SIGN+-}+(×) ∷ Num α ⇒ α → α → α+(×) = (*)+{-# INLINE (×) #-}++{-|+(&#x22C5;) = ('*')++U+22C5, DOT OPERATOR+-}+(⋅) ∷ Num α ⇒ α → α → α+(⋅) = (*)+{-# INLINE (⋅) #-}++{-|+(&#x22A5;) = 'undefined'++U+22A5, UP TACK+-}+(⊥) ∷ α+(⊥) = undefined+{-# INLINE (⊥) #-}++{-|+a &#x2223; b = mod a b == 0++U+2223, DIVIDES+-}+(∣) ∷ Integral a ⇒ a → a → Bool+a ∣ b = mod a b == 0+{-# INLINE (∣) #-}++{-|+a &#x2224; b = not (a &#x2223; b)++U+2224, DOES NOT DIVIDE+-}+(∤) ∷ Integral a ⇒ a → a → Bool+a ∤ b = (¬)(a ∣ b)+{-# INLINE (∤) #-}++{-|+a &#x2212; b = a - b++U+2212, MINUS SIGN+-}+(−) ∷ Num a ⇒ a → a → a+(−) = (-)+{-# INLINE (−) #-}++-------------------------------------------------------------------------------+-- Types+-------------------------------------------------------------------------------++{-|+U+2124, DOUBLE-STRUCK CAPITAL Z+-}+type ℤ = Integer++{-|+U+2124, DOUBLE-STRUCK CAPITAL Q+-}+type ℚ = Ratio ℤ