Copyright | (c) Erich Gut |
---|---|
License | BSD3 |
Maintainer | zerich.gut@gmail.com |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
boolean structure for multivalent logic.
Boolean
class Boolean b where Source #
types with a Boolean
structure, allowing multivalent logic.
Note Every Enum
type which is also Bounded
has a natural implementation
as
, false
= minBound
, true
= maxBound
(
, ||
) = max
(
(as there are min and max bounds the operator (&&
) = min
||
) and (
should be
implemented with a lazy variant of &&
)min
and max
) and
.not
b = toEnum
(fromEnum
maxBound
-
fromEnum
t)
(||) :: b -> b -> b infixr 2 Source #
(&&) :: b -> b -> b infixr 3 Source #
(~>) :: b -> b -> b infixr 1 Source #
Instances
Boolean Statement Source # | |
Defined in OAlg.Data.Statement.Definition not :: Statement -> Statement Source # (||) :: Statement -> Statement -> Statement Source # or :: [Statement] -> Statement Source # (&&) :: Statement -> Statement -> Statement Source # and :: [Statement] -> Statement Source # (~>) :: Statement -> Statement -> Statement Source # | |
Boolean Valid Source # | |
Boolean Bool Source # | |
Bool
Instances
Bounded Bool | Since: base-2.1 |
Enum Bool | Since: base-2.1 |
Generic Bool | |
SingKind Bool | Since: base-4.9.0.0 |
Defined in GHC.Generics type DemoteRep Bool | |
Ix Bool | Since: base-2.1 |
Read Bool | Since: base-2.1 |
Show Bool | Since: base-2.1 |
NFData Bool | |
Defined in Control.DeepSeq | |
Eq Bool | |
Ord Bool | |
HNFData Bool Source # | |
Defined in OAlg.Control.HNFData | |
Boolean Bool Source # | |
Validable Bool Source # | |
Random Bool | |
Uniform Bool | |
Defined in System.Random.Internal uniformM :: StatefulGen g m => g -> m Bool # | |
UniformRange Bool | |
Defined in System.Random.Internal | |
SingI 'False | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
SingI 'True | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
Boolean b => Embeddable Bool b Source # | |
Defined in OAlg.Data.Canonical | |
Projectible Bool Valid Source # | |
Lift Bool | |
type DemoteRep Bool | |
Defined in GHC.Generics | |
type Rep Bool | Since: base-4.6.0.0 |
data Sing (a :: Bool) | |