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

Modulesingleton-bool-0.1.8Haskell2010

Data.Singletons.Bool

Additions to Data.Type.Bool.

  • 1 type
  • 1 class
  • 12 values
datadata SBool (b :: Bool) where
#

Constructors

Instances12EqP, GCompare, GEq, GNFData, GRead, GShow, …
  • EqP SBoolDefined in singleton-bool-0.1.8 · Data.Singletons.Bool
  • GCompare SBoolDefined in singleton-bool-0.1.8 · Data.Singletons.Bool
  • GEq SBoolDefined in singleton-bool-0.1.8 · Data.Singletons.Bool
    Example1 expression
    geq STrue STrueJust Refl
    Example1 expression
    geq STrue SFalseNothing
  • GNFData SBoolDefined in singleton-bool-0.1.8 · Data.Singletons.Bool
  • GRead SBoolDefined in singleton-bool-0.1.8 · Data.Singletons.Bool
    Example1 expression
    readsPrec 0 "Some STrue" :: [(Some SBool, String)][(Some STrue,"")]
    Example1 expression
    readsPrec 0 "Some SFalse" :: [(Some SBool, String)][(Some SFalse,"")]
    Example1 expression
    readsPrec 0 "Some Else" :: [(Some SBool, String)][]
  • GShow SBoolDefined in singleton-bool-0.1.8 · Data.Singletons.Bool
    Example1 expression
    showsPrec 0 STrue """STrue"
  • OrdP SBoolDefined in singleton-bool-0.1.8 · Data.Singletons.Bool
  • Eq (SBool b)Defined in singleton-bool-0.1.8 · Data.Singletons.Bool
  • Ord (SBool b)Defined in singleton-bool-0.1.8 · Data.Singletons.Bool
  • Show (SBool b)Defined in singleton-bool-0.1.8 · Data.Singletons.Bool
  • NFData (SBool b)Defined in singleton-bool-0.1.8 · Data.Singletons.Bool
  • SBoolI b => Boring (SBool b)Defined in singleton-bool-0.1.8 · Data.Singletons.Bool
classclass SBoolI (b :: Bool) where
#

Methods

Instances2SBoolI
  • SBoolI 'FalseDefined in singleton-bool-0.1.8 · Data.Singletons.Bool
  • SBoolI 'TrueDefined in singleton-bool-0.1.8 · Data.Singletons.Bool
valuewithSomeSBool :: Bool -> (forall (b :: Bool). SBool b -> r) -> r
#

Convert a normal Bool to an SBool, passing it into a continuation.

Example1 expression
withSomeSBool True fromSBoolTrue
valuereflectBool :: SBoolI b => proxy b -> Bool
#

Reflect to term-level.

Example1 expression
reflectBool (Proxy :: Proxy 'True)True

Data.Type.Dec

1 declaration

discreteBool is available with base >= 4.7 (GHC-7.8)

valuediscreteBool :: (SBoolI a, SBoolI b) => Dec (a :~: b)
#

Decidable equality.

Example1 expression
decShow (discreteBool :: Dec ('True :~: 'True))"Yes Refl"

Data.Type.Bool and .Equality

7 declarations

These are only defined with base >= 4.7