packages feed

Boolean 0.0.0 → 0.0.1

raw patch · 2 files changed

+12/−4 lines, 2 filesdep ~basePVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base

API changes (from Hackage documentation)

- Data.Boolean: (&&*) :: (Boolean b) => b -> b -> b
- Data.Boolean: (/=*) :: (EqB bool a) => a -> a -> bool
- Data.Boolean: (<*) :: (OrdB bool a) => a -> a -> bool
- Data.Boolean: (<=*) :: (OrdB bool a) => a -> a -> bool
- Data.Boolean: (==*) :: (EqB bool a) => a -> a -> bool
- Data.Boolean: (>*) :: (OrdB bool a) => a -> a -> bool
- Data.Boolean: (>=*) :: (OrdB bool a) => a -> a -> bool
- Data.Boolean: (||*) :: (Boolean b) => b -> b -> b
- Data.Boolean: false :: (Boolean b) => b
- Data.Boolean: instance (Boolean bool) => Boolean (z -> bool)
- Data.Boolean: instance (EqB bool a) => EqB (z -> bool) (z -> a)
- Data.Boolean: instance (IfB bool a) => IfB (z -> bool) (z -> a)
- Data.Boolean: instance (OrdB bool a) => OrdB (z -> bool) (z -> a)
- Data.Boolean: true :: (Boolean b) => b
+ Data.Boolean: (&&*, ||*) :: Boolean b => b -> b -> b
+ Data.Boolean: (<*, >=*, >*, <=*) :: OrdB bool a => a -> a -> bool
+ Data.Boolean: (==*, /=*) :: EqB bool a => a -> a -> bool
+ Data.Boolean: instance Boolean bool => Boolean (z -> bool)
+ Data.Boolean: instance EqB bool a => EqB (z -> bool) (z -> a)
+ Data.Boolean: instance IfB bool a => IfB (z -> bool) (z -> a)
+ Data.Boolean: instance OrdB bool a => OrdB (z -> bool) (z -> a)
+ Data.Boolean: maxB :: (IfB bool a, OrdB bool a) => a -> a -> a
+ Data.Boolean: minB :: (IfB bool a, OrdB bool a) => a -> a -> a
+ Data.Boolean: true, false :: Boolean b => b
- Data.Boolean: boolean :: (IfB bool a) => a -> a -> bool -> a
+ Data.Boolean: boolean :: IfB bool a => a -> a -> bool -> a
- Data.Boolean: class (Boolean bool) => EqB bool a | a -> bool
+ Data.Boolean: class Boolean bool => EqB bool a | a -> bool where u /=* v = notB (u ==* v)
- Data.Boolean: class (Boolean bool) => IfB bool a | a -> bool
+ Data.Boolean: class Boolean bool => IfB bool a | a -> bool
- Data.Boolean: class (Boolean bool) => OrdB bool a | a -> bool
+ Data.Boolean: class Boolean bool => OrdB bool a | a -> bool where u >* v = v <* u u >=* v = notB (u <* v) u <=* v = v >=* u
- Data.Boolean: ifB :: (IfB bool a) => bool -> a -> a -> a
+ Data.Boolean: ifB :: IfB bool a => bool -> a -> a -> a
- Data.Boolean: notB :: (Boolean b) => b -> b
+ Data.Boolean: notB :: Boolean b => b -> b

Files

Boolean.cabal view
@@ -1,7 +1,7 @@ Name:                Boolean-Version:             0.0.0+Version:             0.0.1 Cabal-Version:       >= 1.2-Synopsis:            Generalized boolean ops+Synopsis:            Generalized booleans Category:            Data Description:   Some classes for generalized boolean operations.
src/Data/Boolean.hs view
@@ -28,11 +28,11 @@ module Data.Boolean   (     Boolean(..),IfB(..), boolean, cond, crop-  , EqB(..), OrdB(..)+  , EqB(..), OrdB(..), minB, maxB   ) where  import Data.Monoid (Monoid,mempty)-import Control.Applicative (Applicative(..),liftA2,liftA3)+import Control.Applicative (Applicative(pure),liftA2,liftA3)   {--------------------------------------------------------------------@@ -87,6 +87,14 @@   u >*  v = v <* u   u >=* v = notB (u <* v)   u <=* v = v >=* u++-- | Variant of 'min' using 'ifB' and '(<=*)'+minB :: (IfB bool a, OrdB bool a) => a -> a -> a+u `minB` v = ifB (u <=* v) u v++-- | Variant of 'max' using 'ifB' and '(>=*)'+maxB :: (IfB bool a, OrdB bool a) => a -> a -> a+u `maxB` v = ifB (u >=* v) u v  {--------------------------------------------------------------------     Some instances