packages feed

cond 0.4.0.1 → 0.4.0.2

raw patch · 3 files changed

+7/−5 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Data.Algebra.Boolean: instance Bits a => Boolean (Bitwise a)
+ Data.Algebra.Boolean: instance (Num a, Bits a) => Boolean (Bitwise a)

Files

cond.cabal view
@@ -1,5 +1,5 @@ Name: cond-Version: 0.4.0.1+Version: 0.4.0.2 Synopsis: Basic conditional and boolean operators with monadic variants. Category: Control, Logic, Monad License: BSD3
src/Control/Conditional.hs view
@@ -248,7 +248,7 @@ {-# INLINE (?) #-}  -- |Right bracket of the conditional choice operator. If the predicate--- is 'False', returns 'Nothing', otherwise it returns 'Just' the right-hand+-- is 'True', returns 'Nothing', otherwise it returns 'Just' the right-hand -- argument. (|>) :: ToBool bool => bool -> a -> Maybe a p |> v = if' p Nothing (Just v)
src/Data/Algebra/Boolean.hs view
@@ -109,9 +109,11 @@   (Endo p) <--> (Endo q)  = Endo (\a -> p a <--> q a)    --- |A newtype wrapper that derives a 'Boolean' instance from any 'Bits' instance,+-- |A newtype wrapper that derives a 'Boolean' instance from any type that is both+-- a 'Bits' instance and a 'Num' instance, -- such that boolean logic operations on the 'Bitwise' wrapper correspond to --- bitwise logic operations on the inner type.+-- bitwise logic operations on the inner type. It should be noted that 'false' is+-- defined as 'Bitwise' 0 and 'true' is defined as 'not' 'false'. --  -- In addition, a number of other classes are automatically derived from the inner  -- type. These classes were chosen on the basis that many other 'Bits' @@ -120,7 +122,7 @@                   deriving (Num, Bits, Eq, Ord, Bounded, Enum, Show, Read, Real,                             Integral, Typeable, Data, Ix, Storable, PrintfArg) -instance Bits a => Boolean (Bitwise a) where+instance (Num a, Bits a) => Boolean (Bitwise a) where   true   = not false    false  = Bitwise 0    not    = Bitwise . complement . getBits