base-unicode-symbols-0.2.3/0000755000000000000000000000000013374766413013744 5ustar0000000000000000base-unicode-symbols-0.2.3/Setup.hs0000644000000000000000000000005713374766413015402 0ustar0000000000000000import Distribution.Simple main = defaultMain base-unicode-symbols-0.2.3/README.markdown0000644000000000000000000000203013374766413016440 0ustar0000000000000000This 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`](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. # Credits Original idea by Péter Diviánszky. base-unicode-symbols-0.2.3/LICENSE0000644000000000000000000000275413374766413014761 0ustar0000000000000000Copyright 2009–2018 Roel van Dijk All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * The name of Roel van Dijk and the names of contributors may NOT be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. base-unicode-symbols-0.2.3/base-unicode-symbols.cabal0000644000000000000000000000475113374766413020763 0ustar0000000000000000name: base-unicode-symbols 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, GHC==8.2.2 author: Roel van Dijk maintainer: Roel van Dijk copyright: 2009–2018 Roel van Dijk 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, 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, i.e. → instead of @->@, ∀ instead of @forall@ and many others. . Original idea by Péter Diviánszky. . \[1] extra-source-files: LICENSE, README.markdown source-repository head 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.Monad.Unicode , Data.Bool.Unicode , Data.Eq.Unicode , Data.Foldable.Unicode , Data.Function.Unicode , Data.List.Unicode , Data.Monoid.Unicode , Data.Ord.Unicode , Data.String.Unicode , Prelude.Unicode base-unicode-symbols-0.2.3/src/0000755000000000000000000000000013374766413014533 5ustar0000000000000000base-unicode-symbols-0.2.3/src/Prelude/0000755000000000000000000000000013374766413016133 5ustar0000000000000000base-unicode-symbols-0.2.3/src/Prelude/Unicode.hs0000644000000000000000000000502013374766413020052 0ustar0000000000000000{-# 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 ------------------------------------------------------------------------------- {-| π = 'pi' U+03C0, GREEK SMALL LETTER PI -} π ∷ Floating α ⇒ α π = pi {-# INLINE π #-} {-| (÷) = ('/') U+00F7, DIVISION SIGN -} (÷) ∷ Fractional α ⇒ α → α → α (÷) = (/) {-# INLINE (÷) #-} {-| (⋅) = ('*') U+22C5, DOT OPERATOR -} (⋅) ∷ Num α ⇒ α → α → α (⋅) = (*) {-# INLINE (⋅) #-} {-| (⊥) = 'undefined' U+22A5, UP TACK -} (⊥) ∷ α (⊥) = undefined {-# INLINE (⊥) #-} {-| a ∣ b = mod a b == 0 U+2223, DIVIDES -} (∣) ∷ Integral a ⇒ a → a → Bool a ∣ b = mod a b == 0 {-# INLINE (∣) #-} {-| a ∤ b = not (a ∣ b) U+2224, DOES NOT DIVIDE -} (∤) ∷ Integral a ⇒ a → a → Bool a ∤ b = (¬)(a ∣ b) {-# INLINE (∤) #-} {-| a − 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 ℤ base-unicode-symbols-0.2.3/src/Control/0000755000000000000000000000000013374766413016153 5ustar0000000000000000base-unicode-symbols-0.2.3/src/Control/Monad/0000755000000000000000000000000013374766413017211 5ustar0000000000000000base-unicode-symbols-0.2.3/src/Control/Monad/Unicode.hs0000644000000000000000000000312613374766413021135 0ustar0000000000000000{-# 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 ------------------------------------------------------------------------------- {-| (≫=) = ('>>=') (U+226B, MUCH GREATER-THAN) + (U+3D, EQUALS SIGN) -} (≫=) ∷ Monad m ⇒ m α → (α → m β) → m β (≫=) = (>>=) {-# INLINE (≫=) #-} {-| (≫) = ('>>') U+226B, MUCH GREATER-THAN -} (≫) ∷ Monad m ⇒ m α → m β → m β (≫) = (>>) {-# INLINE (≫) #-} {-| (=≪) = ('=<<') (U+3D, EQUALS SIGN) + (U+226A, MUCH LESS-THAN) -} (=≪) ∷ Monad m ⇒ (α → m β) → m α → m β (=≪) = (=<<) {-# INLINE (=≪) #-} {-| (↣) = ('>=>') (U+21A3, RIGHTWARDS ARROW WITH TAIL) -} (↣) ∷ Monad μ ⇒ (α → μ β) → (β → μ γ) → α → μ γ (↣) = (>=>) {-# INLINE (↣) #-} {-| (↢) = ('<=<') (U+21A2, LEFTWARDS ARROW WITH TAIL) -} (↢) ∷ Monad μ ⇒ (β → μ γ) → (α → μ β) → α → μ γ (↢) = (<=<) {-# INLINE (↢) #-} base-unicode-symbols-0.2.3/src/Control/Arrow/0000755000000000000000000000000013374766413017245 5ustar0000000000000000base-unicode-symbols-0.2.3/src/Control/Arrow/Unicode.hs0000644000000000000000000000407513374766413021175 0ustar0000000000000000{-# 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 {-| (⁂) = ('***') U+2042, ASTERISM -} (⁂) ∷ Arrow a ⇒ a α β → a α' β' → a (α, α') (β, β') (⁂) = (***) {-# INLINE (⁂) #-} #endif {-| (⧻) = ('+++') U+29FB, TRIPLE PLUS -} (⧻) ∷ ArrowChoice a ⇒ a α β → a α' β' → a (Either α α') (Either β β') (⧻) = (+++) {-# INLINE (⧻) #-} {-| (⫴) = ('|||') U+2AF4, TRIPLE VERTICAL BAR BINARY RELATION -} (⫴) ∷ ArrowChoice a ⇒ a α δ → a β δ → a (Either α β) δ (⫴) = (|||) {-# INLINE (⫴) #-} #if ! (MIN_VERSION_base(3,0,3)) {-| (⋙) = ('>>>') U+22D9, VERY MUCH GREATER-THAN -} (⋙) ∷ Arrow a ⇒ a α β → a β γ → a α γ (⋙) = (>>>) {-# INLINE (⋙) #-} {-| (⋘) = ('<<<') U+22D8, VERY MUCH LESS-THAN -} (⋘) ∷ Arrow a ⇒ a β γ → a α β → a α γ (⋘) = (<<<) {-# INLINE (⋘) #-} #endif base-unicode-symbols-0.2.3/src/Control/Applicative/0000755000000000000000000000000013374766413020414 5ustar0000000000000000base-unicode-symbols-0.2.3/src/Control/Applicative/Unicode.hs0000644000000000000000000000175013374766413022341 0ustar0000000000000000{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-} module Control.Applicative.Unicode ( (⊛), (∅) ) where ------------------------------------------------------------------------------- -- Imports ------------------------------------------------------------------------------- -- from base: import Control.Applicative ( Applicative, Alternative, (<*>), empty ) ------------------------------------------------------------------------------- -- Fixities ------------------------------------------------------------------------------- infixl 4 ⊛ ------------------------------------------------------------------------------- -- Symbols ------------------------------------------------------------------------------- {-| (⊛) = '<*>' U+229B, CIRCLED ASTERISK OPERATOR -} (⊛) ∷ Applicative f ⇒ f (α → β) → f α → f β (⊛) = (<*>) {-# INLINE (⊛) #-} {-| (∅) = 'empty' U+2205, EMPTY SET -} (∅) ∷ Alternative f ⇒ f α (∅) = empty {-# INLINE (∅) #-} base-unicode-symbols-0.2.3/src/Control/Category/0000755000000000000000000000000013374766413017730 5ustar0000000000000000base-unicode-symbols-0.2.3/src/Control/Category/Unicode.hs0000644000000000000000000000223213374766413021651 0ustar0000000000000000{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-} module Control.Category.Unicode ( (∘), (⋙), (⋘) ) where ------------------------------------------------------------------------------- -- Imports ------------------------------------------------------------------------------- -- from base: import Control.Category ( Category, (.), (>>>), (<<<) ) ------------------------------------------------------------------------------- -- Fixities ------------------------------------------------------------------------------- infixr 9 ∘ infixr 1 ⋙, ⋘ ------------------------------------------------------------------------------- -- Symbols ------------------------------------------------------------------------------- {-| (∘) = ('.') U+2218, RING OPERATOR -} (∘) ∷ Category c ⇒ c β γ → c α β → c α γ (∘) = (.) {-# INLINE (∘) #-} {-| (⋙) = ('>>>') U+22D9, VERY MUCH GREATER-THAN -} (⋙) ∷ Category c ⇒ c α β → c β γ → c α γ (⋙) = (>>>) {-# INLINE (⋙) #-} {-| (⋘) = ('<<<') U+22D8, VERY MUCH LESS-THAN -} (⋘) ∷ Category c ⇒ c β γ → c α β → c α γ (⋘) = (<<<) {-# INLINE (⋘) #-} base-unicode-symbols-0.2.3/src/Data/0000755000000000000000000000000013374766413015404 5ustar0000000000000000base-unicode-symbols-0.2.3/src/Data/Function/0000755000000000000000000000000013374766413017171 5ustar0000000000000000base-unicode-symbols-0.2.3/src/Data/Function/Unicode.hs0000644000000000000000000000145213374766413021115 0ustar0000000000000000{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-} module Data.Function.Unicode ( (∘) ) where ------------------------------------------------------------------------------- -- Imports ------------------------------------------------------------------------------- -- from base: import Data.Function ( (.) ) ------------------------------------------------------------------------------- -- Fixities ------------------------------------------------------------------------------- infixr 9 ∘ ------------------------------------------------------------------------------- -- Symbols ------------------------------------------------------------------------------- {-| (∘) = ('.') U+2218, RING OPERATOR -} (∘) ∷ (β → γ) → (α → β) → (α → γ) (∘) = (.) {-# INLINE (∘) #-} base-unicode-symbols-0.2.3/src/Data/String/0000755000000000000000000000000013374766413016652 5ustar0000000000000000base-unicode-symbols-0.2.3/src/Data/String/Unicode.hs0000644000000000000000000000015113374766413020571 0ustar0000000000000000{-# LANGUAGE UnicodeSyntax #-} module Data.String.Unicode (𝜀) where import Data.List.Unicode (𝜀) base-unicode-symbols-0.2.3/src/Data/Foldable/0000755000000000000000000000000013374766413017114 5ustar0000000000000000base-unicode-symbols-0.2.3/src/Data/Foldable/Unicode.hs0000644000000000000000000000262513374766413021043 0ustar0000000000000000{-# 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 ------------------------------------------------------------------------------- {-| (∈) = 'elem' U+2208, ELEMENT OF -} (∈) ∷ (Foldable t, Eq α) ⇒ α → t α → Bool (∈) = elem {-# INLINE (∈) #-} {-| (∋) = 'flip' (∈) U+220B, CONTAINS AS MEMBER -} (∋) ∷ (Foldable t, Eq α) ⇒ t α → α → Bool (∋) = flip (∈) {-# INLINE (∋) #-} {-| (∉) = 'notElem' U+2209, NOT AN ELEMENT OF -} (∉) ∷ (Foldable t, Eq α) ⇒ α → t α → Bool (∉) = notElem {-# INLINE (∉) #-} {-| (∌) = 'flip' (∉) U+220C, DOES NOT CONTAIN AS MEMBER -} (∌) ∷ (Foldable t, Eq α) ⇒ t α → α → Bool (∌) = flip (∉) {-# INLINE (∌) #-} base-unicode-symbols-0.2.3/src/Data/Monoid/0000755000000000000000000000000013374766413016631 5ustar0000000000000000base-unicode-symbols-0.2.3/src/Data/Monoid/Unicode.hs0000644000000000000000000000165313374766413020560 0ustar0000000000000000{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-} module Data.Monoid.Unicode ( (∅), (⊕) ) where ------------------------------------------------------------------------------- -- Imports ------------------------------------------------------------------------------- -- from base: import Data.Monoid ( Monoid, mempty, mappend ) ------------------------------------------------------------------------------- -- Fixities ------------------------------------------------------------------------------- infixr 6 ⊕ ------------------------------------------------------------------------------- -- Symbols ------------------------------------------------------------------------------- {-| (∅) = 'mempty' U+2205, EMPTY SET -} (∅) ∷ Monoid α ⇒ α (∅) = mempty {-# INLINE (∅) #-} {-| (⊕) = 'mappend' U+2295, CIRCLED PLUS -} (⊕) ∷ Monoid α ⇒ α → α → α (⊕) = mappend {-# INLINE (⊕) #-} base-unicode-symbols-0.2.3/src/Data/Bool/0000755000000000000000000000000013374766413016277 5ustar0000000000000000base-unicode-symbols-0.2.3/src/Data/Bool/Unicode.hs0000644000000000000000000000277313374766413020232 0ustar0000000000000000{-# 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 ------------------------------------------------------------------------------- {-| (¬) = 'not' U+00AC, NOT SIGN -} (¬) ∷ Bool → Bool (¬) = not {-# INLINE (¬) #-} {-| (∧) = ('&&') U+2227, LOGICAL AND -} (∧) ∷ Bool → Bool → Bool (∧) = (&&) {-# INLINE (∧) #-} {-| (∨) = ('||') U+2228, LOGICAL OR -} (∨) ∷ Bool → Bool → Bool (∨) = (||) {-# INLINE (∨) #-} {-| a ⊻ b = (a ∨ b) ∧ not (a ∧ b) U+22BB, XOR -} (⊻) ∷ Bool → Bool → Bool a ⊻ b = (a || b) && not (a && b) {-# INLINE (⊻) #-} {-| a ⊼ b = not (a ∧ b) U+22bc, NAND -} (⊼) ∷ Bool → Bool → Bool a ⊼ b = not (a && b) {-# INLINE (⊼) #-} {-| a ⊽ b = not (a ∨ b) U+22bd, NOR -} (⊽) ∷ Bool → Bool → Bool a ⊽ b = not (a || b) {-# INLINE (⊽) #-} base-unicode-symbols-0.2.3/src/Data/Eq/0000755000000000000000000000000013374766413015751 5ustar0000000000000000base-unicode-symbols-0.2.3/src/Data/Eq/Unicode.hs0000644000000000000000000000213013374766413017667 0ustar0000000000000000{-# 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 ------------------------------------------------------------------------------- {-| (≡) = ('==') U+2261, IDENTICAL TO -} (≡) ∷ Eq α ⇒ α → α → Bool (≡) = (==) {-# INLINE (≡) #-} {-| (≢) = ('/=') U+2262, NOT IDENTICAL TO -} (≢) ∷ Eq α ⇒ α → α → Bool (≢) = (/=) {-# INLINE (≢) #-} {-| (≠) = ('/=') U+2260, NOT EQUAL TO -} (≠) ∷ Eq α ⇒ α → α → Bool (≠) = (/=) {-# INLINE (≠) #-} base-unicode-symbols-0.2.3/src/Data/Ord/0000755000000000000000000000000013374766413016130 5ustar0000000000000000base-unicode-symbols-0.2.3/src/Data/Ord/Unicode.hs0000644000000000000000000000240413374766413020052 0ustar0000000000000000{-# 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 ------------------------------------------------------------------------------- {-| (≤) = ('<=') U+2264, LESS-THAN OR EQUAL TO -} (≤) ∷ Ord α ⇒ α → α → Bool (≤) = (<=) {-# INLINE (≤) #-} {-| (≥) = ('>=') U+2265, GREATER-THAN OR EQUAL TO -} (≥) ∷ Ord α ⇒ α → α → Bool (≥) = (>=) {-# INLINE (≥) #-} {-| (≮) = ('>=') U+226E, NOT LESS-THAN -} (≮) ∷ Ord α ⇒ α → α → Bool (≮) = (>=) {-# INLINE (≮) #-} {-| (≯) = ('<=') U+226F, NOT GREATER-THAN -} (≯) ∷ Ord α ⇒ α → α → Bool (≯) = (<=) {-# INLINE (≯) #-} base-unicode-symbols-0.2.3/src/Data/List/0000755000000000000000000000000013374766413016317 5ustar0000000000000000base-unicode-symbols-0.2.3/src/Data/List/Unicode.hs0000644000000000000000000000477013374766413020251 0ustar0000000000000000{-# 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 ------------------------------------------------------------------------------- {-| (⧺) = ('++') U+29FA, DOUBLE PLUS -} (⧺) ∷ [α] → [α] → [α] (⧺) = (++) {-# INLINE (⧺) #-} {-| (∈) = 'elem' U+2208, ELEMENT OF -} (∈) ∷ Eq α ⇒ α → [α] → Bool (∈) = elem {-# INLINE (∈) #-} {-| (∋) = 'flip' (∈) U+220B, CONTAINS AS MEMBER -} (∋) ∷ Eq α ⇒ [α] → α → Bool (∋) = flip (∈) {-# INLINE (∋) #-} {-| (∉) = 'notElem' U+2209, NOT AN ELEMENT OF -} (∉) ∷ Eq α ⇒ α → [α] → Bool (∉) = notElem {-# INLINE (∉) #-} {-| (∌) = 'flip' (∉) U+220C, DOES NOT CONTAIN AS MEMBER -} (∌) ∷ Eq α ⇒ [α] → α → Bool (∌) = flip (∉) {-# INLINE (∌) #-} {-| (∪) = 'union' U+222A, UNION -} (∪) ∷ Eq α ⇒ [α] → [α] → [α] (∪) = union {-# INLINE (∪) #-} {-| (∖) = ('\\') U+2216, SET MINUS -} (∖) ∷ Eq α ⇒ [α] → [α] → [α] (∖) = (\\) {-# INLINE (∖) #-} {-| Symmetric difference a ∆ b = (a ∖ b) ∪ (b ∖ a) U+2206, INCREMENT -} (∆) ∷ Eq α ⇒ [α] → [α] → [α] a ∆ b = (a ∖ b) ∪ (b ∖ a) {-# INLINE (∆) #-} {-| (∩) = 'intersect' U+2229, INTERSECTION -} (∩) ∷ Eq α ⇒ [α] → [α] → [α] (∩) = intersect {-# INLINE (∩) #-} {-| (‼) = ('!!') U+203C, DOUBLE EXCLAMATION MARK -} (‼) ∷ [α] → Int → α (‼) = (!!) {-# INLINE (‼) #-} {-| Epsilon, the empty word (or list) (ε) = [] (U+3B5, GREEK SMALL LETTER EPSILON) -} 𝜀 ∷ [a] 𝜀 = [] base-unicode-symbols-0.2.3/src/Numeric/0000755000000000000000000000000013374766413016135 5ustar0000000000000000base-unicode-symbols-0.2.3/src/Numeric/Natural/0000755000000000000000000000000013374766413017543 5ustar0000000000000000base-unicode-symbols-0.2.3/src/Numeric/Natural/Unicode.hs0000644000000000000000000000027713374766413021473 0ustar0000000000000000{-# LANGUAGE NoImplicitPrelude, UnicodeSyntax #-} module Numeric.Natural.Unicode ( ℕ ) where import Numeric.Natural ( Natural ) {-| U+2115, DOUBLE-STRUCK CAPITAL N -} type ℕ = Natural