HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulelinear-base-0.4.0Haskell2010

Data.Bool.Linear

This module provides linear functions on the standard Bool type.

  • 1 type
  • 4 values

The Boolean type

1 declaration
datadata Bool
#
Instances47Bounded, Enum, Data, Read, Show, Ix, …
  • Bounded BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Enum
  • Enum BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Enum
  • Eq BoolDefined in ghc-prim-0.12.0 · GHC.Classes
  • Data BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Data.Data
  • Ord BoolDefined in ghc-prim-0.12.0 · GHC.Classes
  • Read BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Read
  • Show BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Show
  • Ix BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Ix
  • Generic BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • Bits BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Bits

    Interpret Bool as 1-bit bit-field

  • FiniteBits BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Bits
  • Storable BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Foreign.Storable
  • SingKind BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • NFData BoolDefined in deepseq-1.5.0.0 · Control.DeepSeq
  • Pretty BoolDefined in pretty-1.1.3.6 · Text.PrettyPrint.Annotated.HughesPJClass
  • Pretty BoolDefined in pretty-1.1.3.6 · Text.PrettyPrint.HughesPJClass
  • Random BoolDefined in random-1.2.1.3 · System.Random
  • Finite BoolDefined in random-1.2.1.3 · System.Random.GFinite
  • Uniform BoolDefined in random-1.2.1.3 · System.Random.Internal
  • UniformRange BoolDefined in random-1.2.1.3 · System.Random.Internal
  • Arbitrary BoolDefined in QuickCheck-2.15.0.1 · Test.QuickCheck.Arbitrary
  • CoArbitrary BoolDefined in QuickCheck-2.15.0.1 · Test.QuickCheck.Arbitrary
  • Function BoolDefined in QuickCheck-2.15.0.1 · Test.QuickCheck.Function
  • Testable BoolDefined in QuickCheck-2.15.0.1 · Test.QuickCheck.Property
  • Binary BoolDefined in binary-0.8.9.3 · Data.Binary.Class
  • Hashable BoolDefined in hashable-1.4.7.0 · Data.Hashable.Class
  • Unbox BoolDefined in vector-0.13.2.0 · Data.Vector.Unboxed.Base
  • Generic BoolDefined in linear-generics-0.2.3 · Generics.Linear.Instances.Base · orphan
  • Consumable BoolDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Consumable
  • Dupable BoolDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Dupable
  • Movable BoolDefined in linear-base-0.4.0 · Data.Unrestricted.Linear.Internal.Movable
  • Eq BoolDefined in linear-base-0.4.0 · Data.Ord.Linear.Internal.Eq
  • Ord BoolDefined in linear-base-0.4.0 · Data.Ord.Linear.Internal.Ord
  • Lift BoolDefined in template-haskell-2.22.0.0 · Language.Haskell.TH.Syntax
  • SingI 'FalseDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • SingI 'TrueDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • IArray UArray BoolDefined in array-0.5.8.0 · Data.Array.Base
  • Vector Vector BoolDefined in vector-0.13.2.0 · Data.Vector.Unboxed.Base
  • MVector MVector BoolDefined in vector-0.13.2.0 · Data.Vector.Unboxed.Base
  • MArray IOUArray Bool IODefined in array-0.5.8.0 · Data.Array.IO.Internals
  • MArray (STUArray s) Bool (ST s)Defined in array-0.5.8.0 · Data.Array.Base
  • type Rep Bool = D1 ('MetaData "Bool" "GHC.Types" "ghc-prim" 'False) (C1 ('MetaCons "False" 'PrefixI 'False) U1 :+: C1 ('MetaCons "True" 'PrefixI 'False) U1)Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • type DemoteRep Bool = BoolDefined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • data Sing
    • STrue :: R:SingBoola 'True
    • SFalse :: R:SingBoola 'False
    Defined in ghc-internal-9.1003.0 · GHC.Internal.Generics
  • data MVector s BoolDefined in vector-0.13.2.0 · Data.Vector.Unboxed.Base
  • data Vector BoolDefined in vector-0.13.2.0 · Data.Vector.Unboxed.Base
  • type Rep Bool = D1 ('MetaData "Bool" "GHC.Types" "ghc-prim" 'False) (C1 ('MetaCons "False" 'PrefixI 'False) U1 :+: C1 ('MetaCons "True" 'PrefixI 'False) U1)Defined in linear-generics-0.2.3 · Generics.Linear.Instances.Base · orphan

Operators

4 declarations
value(&&) :: Bool %1 -> Bool %1 -> Bool
#

True iff both are True. NOTE: this is strict and not lazy!

value(||) :: Bool %1 -> Bool %1 -> Bool
#

True iff either is True NOTE: this is strict and not lazy!

valuenot :: Bool %1 -> Bool
#

not b is True iff b is False NOTE: this is strict and not lazy!

valueotherwise :: Bool
#

otherwise is defined as the value True. It helps to make guards more readable. eg.

 f x | x < 0     = ...
     | otherwise = ...