packages feed

base-unicode-symbols 0.2.2.4 → 0.2.3

raw patch · 29 files changed

+903/−860 lines, 29 filesdep ~basePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base

API changes (from Hackage documentation)

+ Control.Applicative.Unicode: infixl 4 ⊛
+ Control.Arrow.Unicode: infixr 1 ⋘
+ Control.Arrow.Unicode: infixr 2 ⫴
+ Control.Arrow.Unicode: infixr 3 ⁂
+ Control.Category.Unicode: infixr 1 ⋘
+ Control.Category.Unicode: infixr 9 ∘
+ Control.Monad.Unicode: (↢) :: Monad μ => (β -> μ γ) -> (α -> μ β) -> α -> μ γ
+ Control.Monad.Unicode: (↣) :: Monad μ => (α -> μ β) -> (β -> μ γ) -> α -> μ γ
+ Control.Monad.Unicode: infixl 1 ↣
+ Control.Monad.Unicode: infixr 1 ↢
+ Data.Bool.Unicode: (⊻) :: Bool -> Bool -> Bool
+ Data.Bool.Unicode: (⊼) :: Bool -> Bool -> Bool
+ Data.Bool.Unicode: (⊽) :: Bool -> Bool -> Bool
+ Data.Bool.Unicode: infixr 2 ∨
+ Data.Bool.Unicode: infixr 3 ⊽
+ Data.Eq.Unicode: infix 4 ≠
+ Data.Foldable.Unicode: infix 4 ∌
+ Data.Function.Unicode: infixr 9 ∘
+ Data.List.Unicode: (‼) :: [α] -> Int -> α
+ Data.List.Unicode: infix 4 ∌
+ Data.List.Unicode: infixl 6 ∪
+ Data.List.Unicode: infixl 9 ‼
+ Data.List.Unicode: infixr 5 ⧺
+ Data.List.Unicode: infixr 6 ∩
+ Data.List.Unicode: 𝜀 :: [a]
+ Data.Monoid.Unicode: infixr 6 ⊕
+ Data.Ord.Unicode: infix 4 ≯
+ Data.String.Unicode: 𝜀 :: [a]
+ Numeric.Natural.Unicode: type ℕ = Natural
+ Prelude.Unicode: (‼) :: [α] -> Int -> α
+ Prelude.Unicode: (−) :: Num a => a -> a -> a
+ Prelude.Unicode: (∣) :: Integral a => a -> a -> Bool
+ Prelude.Unicode: (∤) :: Integral a => a -> a -> Bool
+ Prelude.Unicode: infix 4 ∤
+ Prelude.Unicode: infixl 7 ⋅
+ Prelude.Unicode: infixl 9 ‼
+ Prelude.Unicode: infixr 2 ∨
+ Prelude.Unicode: infixr 3 ∧
+ Prelude.Unicode: infixr 5 ⧺
+ Prelude.Unicode: infixr 9 ∘
+ Prelude.Unicode: 𝜀 :: [a]
- Data.Function.Unicode: (∘) :: (β -> γ) -> (α -> β) -> (α -> γ)
+ Data.Function.Unicode: (∘) :: (β -> γ) -> (α -> β) -> α -> γ
- Prelude.Unicode: (∘) :: (β -> γ) -> (α -> β) -> (α -> γ)
+ Prelude.Unicode: (∘) :: (β -> γ) -> (α -> β) -> α -> γ

Files

− Control/Applicative/Unicode.hs
@@ -1,48 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Control.Applicative.Unicode-Copyright  : 2009–2011 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 β-(⊛) = (<*>)-{-# INLINE (⊛) #-}--{-|-(&#x2205;) = 'empty'--U+2205, EMPTY SET--}-(∅) ∷ Alternative f ⇒ f α-(∅) = empty-{-# INLINE (∅) #-}
− Control/Arrow/Unicode.hs
@@ -1,102 +0,0 @@-{-# LANGUAGE CPP, NoImplicitPrelude, UnicodeSyntax, TypeOperators #-}--{-|-Module     : Control.Arrow.Unicode-Copyright  : 2010—2011 Roel van Dijk-License    : BSD3 (see the file LICENSE)-Maintainer : Roel van Dijk <vandijk.roel@gmail.com>--}--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
− Control/Category/Unicode.hs
@@ -1,58 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Control.Category.Unicode-Copyright  : 2009–2011 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 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 (⋘) #-}
− Control/Monad/Unicode.hs
@@ -1,59 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Control.Monad.Unicode-Copyright  : 2010—2011 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 β-(≫=) = (>>=)-{-# 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 (=≪) #-}
− Data/Bool/Unicode.hs
@@ -1,58 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Data.Bool.Unicode-Copyright  : 2009–2011 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-{-# INLINE (¬) #-}--{-|-(&#x2227;) = ('&&')--U+2227, LOGICAL AND--}-(∧) ∷ Bool → Bool → Bool-(∧) = (&&)-{-# INLINE (∧) #-}--{-|-(&#x2228;) = ('||')--U+2228, LOGICAL OR--}-(∨) ∷ Bool → Bool → Bool-(∨) = (||)-{-# INLINE (∨) #-}
− Data/Eq/Unicode.hs
@@ -1,59 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Data.Eq.Unicode-Copyright  : 2009–2011 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-(≡) = (==)-{-# INLINE (≡) #-}--{-|-(&#x2262;) = ('/=')--U+2262, NOT IDENTICAL TO--}-(≢) ∷ Eq α ⇒ α → α → Bool-(≢) = (/=)-{-# INLINE (≢) #-}--{-|-(&#x2260;) = ('/=')--U+2260, NOT EQUAL TO--}-(≠) ∷ Eq α ⇒ α → α → Bool-(≠) = (/=)-{-# INLINE (≠) #-}
− Data/Foldable/Unicode.hs
@@ -1,72 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Data.Foldable.Unicode-Copyright  : 2009–2011 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-{-# 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 (∌) #-}
− Data/Function/Unicode.hs
@@ -1,39 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Data.Function.Unicode-Copyright  : 2009–2011 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--}-(∘) ∷ (β → γ) → (α → β) → (α → γ)-(∘) = (.)-{-# INLINE (∘) #-}
− Data/List/Unicode.hs
@@ -1,128 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Data.List.Unicode-Copyright  : 2009–2011 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--}-(⧺) ∷ [α] → [α] → [α]-(⧺) = (++)-{-# 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 (∩) #-}
− Data/Monoid/Unicode.hs
@@ -1,48 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Data.Monoid.Unicode-Copyright  : 2009–2011 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-{-# INLINE (∅) #-}--{-|-(&#x2295;) = 'mappend'--U+2295, CIRCLED PLUS--}-(⊕) ∷ Monoid α ⇒ α → α → α-(⊕) = mappend-{-# INLINE (⊕) #-}
− Data/Ord/Unicode.hs
@@ -1,70 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Data.Ord.Unicode-Copyright  : 2009–2011 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-(≤) = (<=)-{-# 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 (≯) #-}
LICENSE view
@@ -1,4 +1,4 @@-Copyright 2009–2011 Roel van Dijk+Copyright 2009–2018 Roel van Dijk  All rights reserved. 
− Prelude/Unicode.hs
@@ -1,103 +0,0 @@-{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-}--{-|-Module     : Prelude.Unicode-Copyright  : 2009–2011 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 Data.Ratio ( Ratio )-import Prelude    ( Num, Floating, Fractional, Integer-                  , (/), (*), 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-{-# INLINE π #-}--{-|-(&#x00F7;) = ('/')--U+00F7, DIVISION SIGN--}-(÷) ∷ Fractional α ⇒ α → α → α-(÷) = (/)-{-# INLINE (÷) #-}--{-|-(&#x22C5;) = ('*')--U+22C5, DOT OPERATOR--}-(⋅) ∷ Num α ⇒ α → α → α-(⋅) = (*)-{-# INLINE (⋅) #-}--{-|-(&#x22A5;) = 'undefined'--U+22A5, UP TACK--}-(⊥) ∷ α-(⊥) = undefined-{-# INLINE (⊥) #-}------------------------------------------------------------------------------------- Types----------------------------------------------------------------------------------{-|-U+2124, DOUBLE-STRUCK CAPITAL Z--}-type ℤ = Integer--{-|-U+2124, DOUBLE-STRUCK CAPITAL Q--}-type ℚ = Ratio ℤ
README.markdown view
@@ -1,14 +1,20 @@-This package defines new symbols for a number of functions and-operators in the base package.+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-information regarding their Unicode code point. They should be+All symbols are documented with their actual definition and their Unicode code point. They should be completely interchangeable with their definitions. -For further Unicode goodness you can enable the-[UnicodeSyntax](http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.html#unicode-syntax)+# 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`](http://www.haskell.org/ghc/docs/latest/html/users_guide/syntax-extns.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.+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,12 +1,12 @@ name:          base-unicode-symbols-version:       0.2.2.4+version:       0.2.3 cabal-version: >=1.6 build-type:    Simple stability:     provisional-tested-with:   GHC ==6.8.1, GHC ==6.10.1, GHC ==6.12.1, GHC ==6.12.3, GHC ==7.0.1, GHC ==7.0.3, GHC ==7.2.1+tested-with:   GHC ==6.8.1, GHC ==6.10.1, GHC ==6.12.1, GHC ==6.12.3, GHC ==7.0.1, GHC ==7.0.3, GHC ==7.2.1, GHC==8.2.2 author:        Roel van Dijk <vandijk.roel@gmail.com> maintainer:    Roel van Dijk <vandijk.roel@gmail.com>-copyright:     2009–2011 Roel van Dijk <vandijk.roel@gmail.com>+copyright:     2009–2018 Roel van Dijk <vandijk.roel@gmail.com> license:       BSD3 license-file:  LICENSE category:@@ -22,14 +22,14 @@   completely interchangeable with their definitions.   .   For further Unicode goodness you can enable the @UnicodeSyntax@-  language extension \[1\]. This extension enables Unicode characters+  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 @@ -41,12 +41,23 @@   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-    build-depends: base >= 3.0.3.1 && < 5     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.Monad.Unicode@@ -57,5 +68,5 @@                  , Data.List.Unicode                  , Data.Monoid.Unicode                  , Data.Ord.Unicode+                 , Data.String.Unicode                  , Prelude.Unicode-
+ 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,129 @@+{-# 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 ⋅+infix 4 ∣+infix 4 ∤+++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------++{-|+&#x03C0; = 'pi'++U+03C0, GREEK SMALL LETTER PI+-}+π ∷ Floating α ⇒ α+π = pi+{-# INLINE π #-}++{-|+(&#x00F7;) = ('/')++U+00F7, DIVISION SIGN+-}+(÷) ∷ Fractional α ⇒ α → α → α+(÷) = (/)+{-# 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 ℤ