Safe Haskell | None |
---|---|
Language | GHC2021 |
Rerefined.Predicate.Logical
Description
Logical predicates.
Pretty predicates use infix propositional operators. This is chosen for consistency. I'm not really sure which I prefer over all, perhaps best would be to mix and match. Please let the maintainers know if you have a better idea.
Documentation
data And (l :: k) (r :: k1) Source #
Logical conjunction. Also AND logic gate.
Instances
(Predicate l, Predicate r) => Predicate (And l r :: Type) Source # | Precedence of 3 (matching |
Defined in Rerefined.Predicate.Logical.And | |
(Refine l a, Refine r a, KnownPredicateName (And l r)) => Refine (And l r :: Type) a Source # | |
Defined in Rerefined.Predicate.Logical.And | |
type PredicateName d (And l r :: Type) Source # | |
Defined in Rerefined.Predicate.Logical.And |
data Iff (l :: k) (r :: k1) Source #
Logical biconditional ("if and only if"). Also the XNOR logic gate, or equivalence (loosely).
Instances
(Predicate l, Predicate r) => Predicate (Iff l r :: Type) Source # | Precedence of 4 (matching |
Defined in Rerefined.Predicate.Logical.Iff | |
(Refine l a, Refine r a, KnownPredicateName (Iff l r)) => Refine (Iff l r :: Type) a Source # | |
Defined in Rerefined.Predicate.Logical.Iff | |
type PredicateName d (Iff l r :: Type) Source # | |
Defined in Rerefined.Predicate.Logical.Iff |
data If (l :: k) (r :: k1) Source #
Logical implication. "If l then r".
Instances
(Predicate l, Predicate r) => Predicate (If l r :: Type) Source # | Precedence of 4 (matching |
Defined in Rerefined.Predicate.Logical.If | |
(Refine l a, Refine r a, KnownPredicateName (If l r)) => Refine (If l r :: Type) a Source # | |
Defined in Rerefined.Predicate.Logical.If | |
type PredicateName d (If l r :: Type) Source # | |
Defined in Rerefined.Predicate.Logical.If |
data Nand (l :: k) (r :: k1) Source #
NAND logic gate. Also called the Sheffer stroke, or non-conjunction.
Instances
(Predicate l, Predicate r) => Predicate (Nand l r :: Type) Source # | Precedence of 3 (matching |
Defined in Rerefined.Predicate.Logical.Nand | |
(Refine l a, Refine r a, KnownPredicateName (Nand l r)) => Refine (Nand l r :: Type) a Source # | |
Defined in Rerefined.Predicate.Logical.Nand | |
type PredicateName d (Nand l r :: Type) Source # | |
Defined in Rerefined.Predicate.Logical.Nand |
data Nor (l :: k) (r :: k1) Source #
NOR logic gate. Also called non-disjunction, or joint denial.
Instances
(Predicate l, Predicate r) => Predicate (Nor l r :: Type) Source # | Precedence of 2 (matching |
Defined in Rerefined.Predicate.Logical.Nor | |
(Refine l a, Refine r a, KnownPredicateName (Nor l r)) => Refine (Nor l r :: Type) a Source # | |
Defined in Rerefined.Predicate.Logical.Nor | |
type PredicateName d (Nor l r :: Type) Source # | |
Defined in Rerefined.Predicate.Logical.Nor |
Logical negation. Also NOT logic gate, or logical complement.
Instances
Predicate p => Predicate (Not p :: Type) Source # | Precedence of 9 (one below function application). |
Defined in Rerefined.Predicate.Logical.Not | |
(Refine p a, KnownPredicateName (Not p)) => Refine (Not p :: Type) a Source # | |
Defined in Rerefined.Predicate.Logical.Not | |
type PredicateName d (Not p :: Type) Source # | |
Defined in Rerefined.Predicate.Logical.Not |
data Or (l :: k) (r :: k1) Source #
Logical disjunction. Also OR logic gate.
Instances
(Predicate l, Predicate r) => Predicate (Or l r :: Type) Source # | Precedence of 2 (matching |
Defined in Rerefined.Predicate.Logical.Or | |
(Refine l a, Refine r a, KnownPredicateName (Or l r)) => Refine (Or l r :: Type) a Source # | |
Defined in Rerefined.Predicate.Logical.Or | |
type PredicateName d (Or l r :: Type) Source # | |
Defined in Rerefined.Predicate.Logical.Or |
data Xor (l :: k) (r :: k1) Source #
Logical exclusive disjunction. Also XOR logic gate.
Instances
(Predicate l, Predicate r) => Predicate (Xor l r :: Type) Source # | Precedence of 4 (matching |
Defined in Rerefined.Predicate.Logical.Xor | |
(Refine l a, Refine r a, KnownPredicateName (Xor l r)) => Refine (Xor l r :: Type) a Source # | |
Defined in Rerefined.Predicate.Logical.Xor | |
type PredicateName d (Xor l r :: Type) Source # | |
Defined in Rerefined.Predicate.Logical.Xor |