packages feed

aop-prelude 0.1.0.0 → 0.2.0.0

raw patch · 2 files changed

+59/−6 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ AOPPrelude: (*) :: Num a => a -> a -> a
+ AOPPrelude: (+) :: Num a => a -> a -> a
+ AOPPrelude: (-) :: Num a => a -> a -> a
+ AOPPrelude: (/) :: Fractional a => a -> a -> a
+ AOPPrelude: (/=) :: Eq a => a -> a -> Bool
+ AOPPrelude: (<) :: Ord a => a -> a -> Bool
+ AOPPrelude: (<=) :: Ord a => a -> a -> Bool
+ AOPPrelude: (==) :: Eq a => a -> a -> Bool
+ AOPPrelude: (>) :: Ord a => a -> a -> Bool
+ AOPPrelude: (>=) :: Ord a => a -> a -> Bool
+ AOPPrelude: chr :: Int -> Char
+ AOPPrelude: div :: Integral a => a -> a -> a
+ AOPPrelude: error :: HasCallStack => [Char] -> a
+ AOPPrelude: mod :: Integral a => a -> a -> a
+ AOPPrelude: negate :: Num a => a -> a
+ AOPPrelude: ord :: Char -> Int
+ AOPPrelude: show :: Show a => a -> String
+ AOPPrelude: strict :: () => (a -> b) -> a -> b

Files

aop-prelude.cabal view
@@ -4,7 +4,7 @@ -- http://haskell.org/cabal/users-guide/  name:                aop-prelude-version:             0.1.0.0+version:             0.2.0.0 synopsis:            prelude for Algebra of Programming description:         prelude for Algenra of Programming, the original code was created by Richard Bird. homepage:            https://github.com/cutsea110/aop-prelude.git
src/AOPPrelude.hs view
@@ -1,12 +1,64 @@ {-# LANGUAGE NoImplicitPrelude #-}-module AOPPrelude where+module AOPPrelude+  ( -- Standard combinators+    (.), const, id+  , outl, outr, swap+  , assocl, assocr+  , dupl, dupr+  , pair, cross, cond+  , curry, uncurry+    -- Boolean functions+  , false, true+  , (&&)+  , (||)+  , not+  , otherwise+    -- Relations+  , leq, less, eql, neq, gtr, geq+  , meet, join, wok+    -- Numerical functions+  , zero, succ, pred+  , plus, minus, times, divide+  , negative, positive+    -- List-processing functions+  , (++)+  , null+  , nil, wrap, cons, cat, concat, snoc+  , head, tail, split+  , last, init+  , inits, tails, splits+  , cpp, cpl, cpr, cplist+  , minlist, bmin+  , maxlist, bmax+  , thinlist+  , length, sum, trans, list, filter+  , catalist+  , cata1list+  , cata2list+  , loop+  , merge+  , zip+  , unzip+    -- Word and line processing functions+  , words+  , lines+  , unwords+  , unlines+    -- Essentials and built-in primitives+  , ord, chr+  , (==), (/=), (<=), (<), (>=), (>)+  , (+), (-), (/), div, mod, (*)+  , negate, primPrint, strict, error+  , show+  , flip+  ) where --------------------------------------------------------------------- -- Prelude for `Algebra of Programming' ----------------------------- -- Original created 14 Sept, 1995, by Richard Bird ------------------ ---------------------------------------------------------------------  -- Operator precedence table: ----------------------------------------import GHC.Base ((==), (/=), (<), (<=), (>=), (>))+import GHC.Base ((==), (/=), (<), (<=), (>=), (>), ($!)) import GHC.Err (error) import GHC.Num ((+), (-), (*), negate) import GHC.Real ((/), div, mod, Fractional)@@ -85,6 +137,7 @@ zero   = const 0 succ   = (+1) pred   = (-1)+ plus   = uncurry (+) minus  = uncurry (-) times  = uncurry (*)@@ -118,7 +171,6 @@  inits = catalist ([[]], extend)   where extend (a, xs) = [[]] ++ list (a:) xs- tails = catalist ([[]], extend)   where extend (a, x:xs) = (a:x):x:xs splits = zip . pair (inits, tails)@@ -188,11 +240,12 @@ unlines = cata1list (id, join)   where join (x, y) = x ++ "\n" ++ y --- Essential and built-in primitives: -------------------------------+-- Essentials and built-in primitives: -------------------------------  primPrint :: Show a => a -> IO () primPrint = print--- strict = undefined -- FIXME!++strict = ($!)  flip f a b = f b a