| Copyright | (C) 2026 - Eitan Chatav |
|---|---|
| License | BSD-style (see the file LICENSE) |
| Maintainer | Eitan Chatav <eitan.chatav@gmail.com> |
| Stability | provisional |
| Portability | non-portable |
| Safe Haskell | None |
| Language | Haskell2010 |
Control.Lens.Grammar.Boole
Contents
Description
See Boole, The Mathematical Analysis of Logic.
Synopsis
- class BooleanAlgebra b where
- andB :: (Foldable f, BooleanAlgebra b) => f b -> b
- orB :: (Foldable f, BooleanAlgebra b) => f b -> b
- allB :: (Foldable f, BooleanAlgebra b) => (a -> b) -> f a -> b
- anyB :: (Foldable f, BooleanAlgebra b) => (a -> b) -> f a -> b
BooleanAlgebra
class BooleanAlgebra b where Source #
A BooleanAlgebra, like Bool, supporting classical logical operations.
Minimal complete definition
Nothing
Methods
(>&&<) :: b -> b -> b Source #
conjunction
default (>&&<) :: forall (f :: Type -> Type) bool. (b ~ f bool, BooleanAlgebra bool, Applicative f) => b -> b -> b Source #
(>||<) :: b -> b -> b Source #
disjunction
default (>||<) :: forall (f :: Type -> Type) bool. (b ~ f bool, BooleanAlgebra bool, Applicative f) => b -> b -> b Source #
negation
default notB :: forall (f :: Type -> Type) bool. (b ~ f bool, BooleanAlgebra bool, Functor f) => b -> b Source #
true
default trueB :: forall (f :: Type -> Type) bool. (b ~ f bool, BooleanAlgebra bool, Applicative f) => b Source #
false
default falseB :: forall (f :: Type -> Type) bool. (b ~ f bool, BooleanAlgebra bool, Applicative f) => b Source #
Instances
andB :: (Foldable f, BooleanAlgebra b) => f b -> b Source #
cumulative conjunction
orB :: (Foldable f, BooleanAlgebra b) => f b -> b Source #
cumulative disjunction
allB :: (Foldable f, BooleanAlgebra b) => (a -> b) -> f a -> b Source #
universal
anyB :: (Foldable f, BooleanAlgebra b) => (a -> b) -> f a -> b Source #
existential