HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Modulesingleton-bool-0.1.8Haskell2010

Data.Singletons.Bool

Additions to Data.Type.Bool.

Contents
  1. Data.Type.Dec
  2. Data.Type.Bool and .Equality
Synopsis
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
valuereflectBool :: SBoolI b => proxy b -> Bool

Reflect to term-level.

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

Data.Type.Dec

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

Data.Type.Bool and .Equality

These are only defined with base >= 4.7