base-unicode-symbols 0.1 → 0.1.1
raw patch · 11 files changed
+313/−123 lines, 11 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Data.Bool.Unicode: (¬) :: Bool -> Bool
+ Data.Bool.Unicode: (∧) :: Bool -> Bool -> Bool
+ Data.Bool.Unicode: (∨) :: Bool -> Bool -> Bool
+ Data.Eq.Unicode: (≡) :: (Eq α) => α -> α -> Bool
+ Data.Eq.Unicode: (≢) :: (Eq α) => α -> α -> Bool
+ Data.Foldable.Unicode: (∈) :: (Foldable t, Eq α) => α -> t α -> Bool
+ Data.Foldable.Unicode: (∉) :: (Foldable t, Eq α) => α -> t α -> Bool
+ Data.Function.Unicode: (∘) :: (b -> c) -> (a -> b) -> (a -> c)
+ Data.List.Unicode: (∈) :: (Eq α) => α -> [α] -> Bool
+ Data.List.Unicode: (∉) :: (Eq α) => α -> [α] -> Bool
+ Data.List.Unicode: (∩) :: (Eq α) => [α] -> [α] -> [α]
+ Data.List.Unicode: (∪) :: (Eq α) => [α] -> [α] -> [α]
+ Data.Ord.Unicode: (≤) :: (Ord α) => α -> α -> Bool
+ Data.Ord.Unicode: (≥) :: (Ord α) => α -> α -> Bool
+ Data.Ord.Unicode: (≮) :: (Ord α) => α -> α -> Bool
+ Data.Ord.Unicode: (≯) :: (Ord α) => α -> α -> Bool
Files
- Control/Applicative/Unicode.hs +16/−8
- Control/Category/Unicode.hs +15/−6
- Data/Bool/Unicode.hs +43/−0
- Data/Eq/Unicode.hs +36/−0
- Data/Foldable/Unicode.hs +37/−0
- Data/Function/Unicode.hs +26/−0
- Data/List/Unicode.hs +53/−0
- Data/Monoid/Unicode.hs +13/−1
- Data/Ord/Unicode.hs +54/−0
- Prelude/Unicode.hs +13/−107
- base-unicode-symbols.cabal +7/−1
Control/Applicative/Unicode.hs view
@@ -1,15 +1,23 @@+{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE UnicodeSyntax #-} -module Control.Applicative.Unicode- ( (⊛)- , (∅)- ) where+module Control.Applicative.Unicode ( (⊛), (∅) ) where -import Control.Applicative ( Applicative- , Alternative- , (<*>)- , empty+import Control.Applicative ( Applicative, Alternative+ , (<*>), empty )+++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infixl 4 ⊛+++-------------------------------------------------------------------------------+-- Symbols+------------------------------------------------------------------------------- {- | (⊛) = '<*>'
Control/Category/Unicode.hs view
@@ -1,12 +1,22 @@+{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE UnicodeSyntax #-} -module Control.Category.Unicode- ( (∘)- ) where+module Control.Category.Unicode ( (∘) ) where -import Prelude hiding ( (.) )-import Control.Category+import Control.Category ( Category, (.) ) ++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infixr 9 ∘+++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------+ {- | (∘) = ('.') @@ -15,4 +25,3 @@ (∘) ∷ Category cat ⇒ cat b c → cat a b → cat a c (∘) = (.) -infixr 9 ∘
+ Data/Bool/Unicode.hs view
@@ -0,0 +1,43 @@+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE UnicodeSyntax #-}++module Data.Bool.Unicode ( (∧), (∨), (¬) ) where++import Data.Bool ( Bool, (&&), (||), not )+++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infixr 2 ∨+infixr 3 ∧+++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------++{- |+(¬) = 'not'++U+00AC, NOT SIGN+-}+(¬) ∷ Bool → Bool+(¬) = not++{- |+(∧) = ('&&')++U+2227, LOGICAL AND+-}+(∧) ∷ Bool → Bool → Bool+(∧) = (&&)++{- |+(∨) = ('||')++U+2228, LOGICAL OR+-}+(∨) ∷ Bool → Bool → Bool+(∨) = (||)
+ Data/Eq/Unicode.hs view
@@ -0,0 +1,36 @@+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE UnicodeSyntax #-}++module Data.Eq.Unicode ( (≡), (≢) ) where++import Data.Bool ( Bool )+import Data.Eq ( Eq, (==), (/=) )+++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infix 4 ≡+infix 4 ≢+++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------++{- |+(≡) = ('==')++U+2261, IDENTICAL TO+-}+(≡) ∷ Eq α ⇒ α → α → Bool+(≡) = (==)++{- |+(≢) = ('/=')++U+2262, NOT IDENTICAL TO+-}+(≢) ∷ Eq α ⇒ α → α → Bool+(≢) = (/=)
+ Data/Foldable/Unicode.hs view
@@ -0,0 +1,37 @@+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE UnicodeSyntax #-}++module Data.Foldable.Unicode where++import Data.Bool ( Bool )+import Data.Eq ( Eq )+import Data.Foldable ( Foldable, elem, notElem )+++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infix 4 ∈+infix 4 ∉+++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------++{- |+(∈) = 'elem'++U+2208, ELEMENT OF+-}+(∈) ∷ (Foldable t, Eq α) ⇒ α → t α → Bool+(∈) = elem++{- |+(∉) = 'notElem'++U+2209, NOT AN ELEMENT OF+-}+(∉) ∷ (Foldable t, Eq α) ⇒ α → t α → Bool+(∉) = notElem
+ Data/Function/Unicode.hs view
@@ -0,0 +1,26 @@+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE UnicodeSyntax #-}++module Data.Function.Unicode ( (∘) ) where++import Data.Function ( (.) )+++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infixr 9 ∘+++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------++{- |+(∘) = ('.')++U+2218, RING OPERATOR+-}+(∘) ∷ (b → c) → (a → b) → (a → c)+(∘) = (.)
+ Data/List/Unicode.hs view
@@ -0,0 +1,53 @@+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE UnicodeSyntax #-}++module Data.List.Unicode ( (∈), (∉), (∪), (∩) ) where++import Data.Bool ( Bool )+import Data.Eq ( Eq )+import Data.List ( elem, notElem , union, intersect )+++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infix 4 ∈+infix 4 ∉+++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------++{- |+(∈) = 'elem'++U+2208, ELEMENT OF+-}+(∈) ∷ Eq α ⇒ α → [α] → Bool+(∈) = elem++{- |+(∉) = 'notElem'++U+2209, NOT AN ELEMENT OF+-}+(∉) ∷ Eq α ⇒ α → [α] → Bool+(∉) = notElem++{- |+(∪) = 'union'++U+222A, UNION+-}+(∪) ∷ Eq α ⇒ [α] → [α] → [α]+(∪) = union++{- |+(∩) = 'intersect'++U+2229, INTERSECTION+-}+(∩) ∷ Eq α ⇒ [α] → [α] → [α]+(∩) = intersect
Data/Monoid/Unicode.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE UnicodeSyntax #-} module Data.Monoid.Unicode @@ -7,6 +8,18 @@ import Data.Monoid ( Monoid, mempty, mappend ) ++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infixr 6 ⊕+++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------+ {- | (∅) = 'mempty' @@ -23,4 +36,3 @@ (⊕) ∷ Monoid α ⇒ α → α → α (⊕) = mappend -infixr 6 ⊕
+ Data/Ord/Unicode.hs view
@@ -0,0 +1,54 @@+{-# LANGUAGE NoImplicitPrelude #-}+{-# LANGUAGE UnicodeSyntax #-}++module Data.Ord.Unicode ( (≤), (≥), (≮), (≯) ) where++import Data.Bool ( Bool )+import Data.Ord ( Ord, (<=), (>=) )+++-------------------------------------------------------------------------------+-- Fixities+-------------------------------------------------------------------------------++infix 4 ≤+infix 4 ≥+infix 4 ≮+infix 4 ≯+++-------------------------------------------------------------------------------+-- Symbols+-------------------------------------------------------------------------------++{- |+(≤) = ('<=')++U+2264, LESS-THAN OR EQUAL TO+-}+(≤) ∷ Ord α ⇒ α → α → Bool+(≤) = (<=)++{- |+(≥) = ('>=')++U+2265, GREATER-THAN OR EQUAL TO+-}+(≥) ∷ Ord α ⇒ α → α → Bool+(≥) = (>=)++{- |+(≮) = ('>=')++U+226E, NOT LESS-THAN+-}+(≮) ∷ Ord α ⇒ α → α → Bool+(≮) = (>=)++{- |+(≯) = ('<=')++U+226F, NOT GREATER-THAN+-}+(≯) ∷ Ord α ⇒ α → α → Bool+(≯) = (<=)
Prelude/Unicode.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE UnicodeSyntax #-} module Prelude.Unicode@@ -11,101 +12,30 @@ , (⊥) ) where +import Data.Bool.Unicode ( (∧), (∨), (¬) )+import Data.Eq.Unicode ( (≡), (≢) )+import Data.Function.Unicode ( (∘) )+import Data.List.Unicode ( (∈), (∉) ) +import Data.Ord.Unicode ( (≤), (≥), (≮), (≯) )++import Prelude ( Num, Floating, Fractional+ , (/), (*), pi, undefined + )++ ------------------------------------------------------------------------------- -- Fixities ------------------------------------------------------------------------------- -infixr 2 ∨-infixr 3 ∧-infix 4 ≡-infix 4 ≢-infix 4 ≤-infix 4 ≥-infix 4 ≮-infix 4 ≯-infix 4 ∈-infix 4 ∉ infixl 7 ÷ infixl 7 ⋅-infixr 9 ∘ + ------------------------------------------------------------------------------- -- Symbols ------------------------------------------------------------------------------- {- |-(¬) = 'not'--U+00AC, NOT SIGN--}-(¬) ∷ Bool → Bool-(¬) = not--{- |-(∧) = ('&&')--U+2227, LOGICAL AND--}-(∧) ∷ Bool → Bool → Bool-(∧) = (&&)--{- |-(∨) = ('||')--U+2228, LOGICAL OR--}-(∨) ∷ Bool → Bool → Bool-(∨) = (||)--{- |-(≡) = ('==')--U+2261, IDENTICAL TO--}-(≡) ∷ Eq α ⇒ α → α → Bool-(≡) = (==)--{- |-(≢) = ('/=')--U+2262, NOT IDENTICAL TO--}-(≢) ∷ Eq α ⇒ α → α → Bool-(≢) = (/=)--{- |-(≤) = ('<=')--U+2264, LESS-THAN OR EQUAL TO--}-(≤) ∷ Ord α ⇒ α → α → Bool-(≤) = (<=)--{- |-(≥) = ('>=')--U+2265, GREATER-THAN OR EQUAL TO--}-(≥) ∷ Ord α ⇒ α → α → Bool-(≥) = (>=)--{- |-(≮) = ('>=')--U+226E, NOT LESS-THAN--}-(≮) ∷ Ord α ⇒ α → α → Bool-(≮) = (>=)--{- |-(≯) = ('<=')--U+226F, NOT GREATER-THAN--}-(≯) ∷ Ord α ⇒ α → α → Bool-(≯) = (<=)--{- | π = 'pi' U+03C0, GREEK SMALL LETTER PI@@ -128,30 +58,6 @@ -} (⋅) ∷ Num α ⇒ α → α → α (⋅) = (*)--{- |-(∘) = ('.')--U+2218, RING OPERATOR--}-(∘) ∷ (b → c) → (a → b) → (a → c)-(∘) = (.)--{- |-(∈) = 'elem'--U+2208, ELEMENT OF--}-(∈) ∷ Eq α ⇒ α → [α] → Bool-(∈) = elem--{- |-x ∉ y = 'not' (x ∈ y)--U+2209, NOT AN ELEMENT OF--}-(∉) ∷ Eq α ⇒ α → [α] → Bool-x ∉ y = not (x ∈ y) {- | (⊥) = 'undefined'
base-unicode-symbols.cabal view
@@ -1,5 +1,5 @@ name: base-unicode-symbols-version: 0.1+version: 0.1.1 cabal-version: >=1.6 build-type: Simple stability: experimental@@ -28,6 +28,12 @@ library exposed-modules: Control.Applicative.Unicode , Control.Category.Unicode+ , Data.Bool.Unicode+ , Data.Eq.Unicode+ , Data.Foldable.Unicode+ , Data.Function.Unicode+ , Data.List.Unicode , Data.Monoid.Unicode+ , Data.Ord.Unicode , Prelude.Unicode build-depends: base >= 3.0.3.1 && < 4.3