Copyright | © Edward Kmett 2010-2014, Johan Kiviniemi 2013 |
---|---|
License | BSD3 |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
- data Bit
- assert :: (MonadState s m, HasSAT s) => Bit -> m ()
- class Boolean b where
- bool :: Bool -> b
- true :: b
- false :: b
- (&&) :: b -> b -> b
- (||) :: b -> b -> b
- (==>) :: b -> b -> b
- not :: b -> b
- and :: Foldable t => t b -> b
- or :: Foldable t => t b -> b
- nand :: Foldable t => t b -> b
- nor :: Foldable t => t b -> b
- all :: (Foldable t, Boolean b) => (a -> b) -> t a -> b
- any :: (Foldable t, Boolean b) => (a -> b) -> t a -> b
- xor :: b -> b -> b
- choose :: b -> b -> b -> b
Documentation
A Bit
provides a reference to a possibly indeterminate boolean
value that can be determined by an external SAT solver.
assert :: (MonadState s m, HasSAT s) => Bit -> m () Source
The normal Bool
operators in Haskell are not overloaded. This
provides a richer set that are.
Instances for this class for product-like types can be automatically derived
for any type that is an instance of Generic
Nothing
Lift a Bool
(&&) :: b -> b -> b infixr 3 Source
Logical conjunction.
(||) :: b -> b -> b infixr 2 Source
Logical disjunction (inclusive or).
(==>) :: b -> b -> b infixr 0 Source
Logical implication.
Logical negation
and :: Foldable t => t b -> b Source
The logical conjunction of several values.
or :: Foldable t => t b -> b Source
The logical disjunction of several values.
nand :: Foldable t => t b -> b Source
nor :: Foldable t => t b -> b Source
all :: (Foldable t, Boolean b) => (a -> b) -> t a -> b Source
The logical conjunction of the mapping of a function over several values.
any :: (Foldable t, Boolean b) => (a -> b) -> t a -> b Source
The logical disjunction of the mapping of a function over several values.
Exclusive-or
:: b | False branch |
-> b | True branch |
-> b | Predicate/selector branch |
-> b |
Choose between two alternatives based on a selector bit.