Portability | non-portable |
---|---|
Stability | experimental |
Maintainer | Edward Kmett <ekmett@gmail.com> |
Safe Haskell | None |
- newtype Bit = Bit (Circuit 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
Lift a Bool
Logical conjunction.
Logical disjunction (inclusive or).
Logical implication.
Logical negation
and :: Foldable t => t b -> bSource
The logical conjunction of several values.
or :: Foldable t => t b -> bSource
The logical disjunction of several values.
nand :: Foldable t => t b -> bSource
nor :: Foldable t => t b -> bSource
all :: (Foldable t, Boolean b) => (a -> b) -> t a -> bSource
The logical conjunction of the mapping of a function over several values.
any :: (Foldable t, Boolean b) => (a -> b) -> t a -> bSource
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.