base-unicode-symbols (empty) → 0.1
raw patch · 7 files changed
+301/−0 lines, 7 filesdep +basesetup-changed
Dependencies added: base
Files
- Control/Applicative/Unicode.hs +28/−0
- Control/Category/Unicode.hs +18/−0
- Data/Monoid/Unicode.hs +26/−0
- LICENSE +31/−0
- Prelude/Unicode.hs +162/−0
- Setup.hs +3/−0
- base-unicode-symbols.cabal +33/−0
+ Control/Applicative/Unicode.hs view
@@ -0,0 +1,28 @@+{-# LANGUAGE UnicodeSyntax #-}++module Control.Applicative.Unicode+ ( (⊛)+ , (∅)+ ) where++import Control.Applicative ( Applicative+ , Alternative+ , (<*>)+ , empty+ )++{- |+(⊛) = '<*>'++U+229B, CIRCLED ASTERISK OPERATOR+-}+(⊛) ∷ Applicative f ⇒ f (α → β) → f α → f β+(⊛) = (<*>)+ +{- |+(∅) = 'empty'++U+2205, EMPTY SET+-}+(∅) ∷ Alternative f ⇒ f α+(∅) = empty
+ Control/Category/Unicode.hs view
@@ -0,0 +1,18 @@+{-# LANGUAGE UnicodeSyntax #-}++module Control.Category.Unicode+ ( (∘)+ ) where++import Prelude hiding ( (.) )+import Control.Category++{- |+(∘) = ('.')++U+2218, RING OPERATOR+-}+(∘) ∷ Category cat ⇒ cat b c → cat a b → cat a c+(∘) = (.)++infixr 9 ∘
+ Data/Monoid/Unicode.hs view
@@ -0,0 +1,26 @@+{-# LANGUAGE UnicodeSyntax #-}++module Data.Monoid.Unicode + ( (∅)+ , (⊕) + ) where++import Data.Monoid ( Monoid, mempty, mappend )++{- |+(∅) = 'mempty'++U+2205, EMPTY SET+-}+(∅) ∷ Monoid α ⇒ α+(∅) = mempty++{- |+(⊕) = 'mappend'++U+2295, CIRCLED PLUS+-}+(⊕) ∷ Monoid α ⇒ α → α → α+(⊕) = mappend++infixr 6 ⊕
+ LICENSE view
@@ -0,0 +1,31 @@+Copyright (c) 2009 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.
+ Prelude/Unicode.hs view
@@ -0,0 +1,162 @@+{-# LANGUAGE UnicodeSyntax #-}++module Prelude.Unicode+ ( (¬), (∧), (∨)+ , (≡), (≢)+ , (≤), (≥), (≮), (≯)+ , π+ , (÷), (⋅)+ , (∘)+ , (∈), (∉)+ , (⊥)+ ) where++-------------------------------------------------------------------------------+-- 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+-}+π ∷ Floating α ⇒ α+π = pi++{- |+(÷) = ('/')++U+00F7, DIVISION SIGN+-}+(÷) ∷ Fractional α ⇒ α → α → α+(÷) = (/)++{- |+(⋅) = ('*')++U+22C5, DOT OPERATOR+-}+(⋅) ∷ 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'++U+22A5, UP TACK+-}+(⊥) ∷ α+(⊥) = undefined
+ Setup.hs view
@@ -0,0 +1,3 @@+import Distribution.Simple++main = defaultMain
+ base-unicode-symbols.cabal view
@@ -0,0 +1,33 @@+name: base-unicode-symbols+version: 0.1+cabal-version: >=1.6+build-type: Simple+stability: experimental+author: Roel van Dijk+maintainer: vandijk.roel@gmail.com+copyright: (c) 2009 Roel van Dijk+license: BSD3+license-file: LICENSE+category:+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.++ .++ All symbols are documented with their actual definition and+ information regarding their Unicode code point. They should be+ completely interchangeable with their definitions.++source-repository head+ type: darcs+ location: http://code.haskell.org/~roelvandijk/code/base-unicode-symbols++library+ exposed-modules: Control.Applicative.Unicode+ , Control.Category.Unicode+ , Data.Monoid.Unicode+ , Prelude.Unicode+ build-depends: base >= 3.0.3.1 && < 4.3