Copyright | (C) 2013-2014 Richard Eisenberg Jan Stolarek |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Ryan Scott |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Defines functions and datatypes relating to the singleton for Bool
,
including a singletons version of all the definitions in Data.Bool
.
Because many of these definitions are produced by Template Haskell,
it is not possible to create proper Haddock documentation. Please look
up the corresponding operation in Data.Bool
. Also, please excuse
the apparent repeated variable names. This is due to an interaction
between Template Haskell and Haddock.
Synopsis
- type family Sing
- data SBool z where
- type family If (cond :: Bool) (tru :: k) (fls :: k) :: k where ...
- sIf :: Sing a -> Sing b -> Sing c -> Sing (If a b c)
- type family Not (a :: Bool) = (res :: Bool) | res -> a where ...
- sNot :: Sing a -> Sing (Not a)
- type family (a :: Bool) && (b :: Bool) :: Bool where ...
- type family (a :: Bool) || (b :: Bool) :: Bool where ...
- (%&&) :: Sing a -> Sing b -> Sing (a && b)
- (%||) :: Sing a -> Sing b -> Sing (a || b)
- bool_ :: a -> a -> Bool -> a
- type family Bool_ a a a where ...
- sBool_ :: forall a (t :: a) (t :: a) (t :: Bool). Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply Bool_Sym0 t) t) t :: a)
- type family Otherwise where ...
- sOtherwise :: Sing (OtherwiseSym0 :: Bool)
- type TrueSym0 = 'True :: Bool
- type FalseSym0 = 'False :: Bool
- data NotSym0 a6989586621679367240
- type NotSym1 (a6989586621679367240 :: Bool) = Not a6989586621679367240 :: Bool
- data (&&@#@$) a6989586621679366665
- data a6989586621679366665 &&@#@$$ a6989586621679366666
- type (&&@#@$$$) (a6989586621679366665 :: Bool) (a6989586621679366666 :: Bool) = (&&) a6989586621679366665 a6989586621679366666 :: Bool
- data (||@#@$) a6989586621679366963
- data a6989586621679366963 ||@#@$$ a6989586621679366964
- type (||@#@$$$) (a6989586621679366963 :: Bool) (a6989586621679366964 :: Bool) = (||) a6989586621679366963 a6989586621679366964 :: Bool
- data Bool_Sym0 a6989586621679365865
- data Bool_Sym1 a6989586621679365865 a6989586621679365866
- data Bool_Sym2 a6989586621679365865 a6989586621679365866 a6989586621679365867
- type Bool_Sym3 (a6989586621679365865 :: a) (a6989586621679365866 :: a) (a6989586621679365867 :: Bool) = Bool_ a6989586621679365865 a6989586621679365866 a6989586621679365867 :: a
- type OtherwiseSym0 = Otherwise :: Bool
The Bool
singleton
The singleton kind-indexed type family.
Instances
Instances
TestCoercion SBool Source # | |
Defined in Data.Singletons.Prelude.Instances | |
TestEquality SBool Source # | |
Defined in Data.Singletons.Prelude.Instances | |
Show (SBool z) Source # | |
Conditionals
type family If (cond :: Bool) (tru :: k) (fls :: k) :: k where ... #
Type-level If. If True a b
==> a
; If False a b
==> b
Singletons from Data.Bool
type family Not (a :: Bool) = (res :: Bool) | res -> a where ... #
Type-level "not". An injective type family since 4.10.0.0
.
Since: base-4.7.0.0
The following are derived from the function bool
in Data.Bool
. The extra
underscore is to avoid name clashes with the type Bool
.
sBool_ :: forall a (t :: a) (t :: a) (t :: Bool). Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply Bool_Sym0 t) t) t :: a) Source #
sOtherwise :: Sing (OtherwiseSym0 :: Bool) Source #
Defunctionalization symbols
data NotSym0 a6989586621679367240 Source #
Instances
SingI NotSym0 Source # | |
SuppressUnusedWarnings NotSym0 Source # | |
Defined in Data.Singletons.Prelude.Bool suppressUnusedWarnings :: () Source # | |
type Apply NotSym0 (a6989586621679367240 :: Bool) Source # | |
Defined in Data.Singletons.Prelude.Bool |
data (&&@#@$) a6989586621679366665 infixr 3 Source #
Instances
SingI (&&@#@$) Source # | |
SuppressUnusedWarnings (&&@#@$) Source # | |
Defined in Data.Singletons.Prelude.Bool suppressUnusedWarnings :: () Source # | |
type Apply (&&@#@$) (a6989586621679366665 :: Bool) Source # | |
Defined in Data.Singletons.Prelude.Bool |
data a6989586621679366665 &&@#@$$ a6989586621679366666 infixr 3 Source #
Instances
SingI x => SingI ((&&@#@$$) x :: TyFun Bool Bool -> Type) Source # | |
SuppressUnusedWarnings ((&&@#@$$) a6989586621679366665 :: TyFun Bool Bool -> Type) Source # | |
Defined in Data.Singletons.Prelude.Bool suppressUnusedWarnings :: () Source # | |
type Apply ((&&@#@$$) a6989586621679366665 :: TyFun Bool Bool -> Type) (a6989586621679366666 :: Bool) Source # | |
type (&&@#@$$$) (a6989586621679366665 :: Bool) (a6989586621679366666 :: Bool) = (&&) a6989586621679366665 a6989586621679366666 :: Bool infixr 3 Source #
data (||@#@$) a6989586621679366963 infixr 2 Source #
Instances
SingI (||@#@$) Source # | |
SuppressUnusedWarnings (||@#@$) Source # | |
Defined in Data.Singletons.Prelude.Bool suppressUnusedWarnings :: () Source # | |
type Apply (||@#@$) (a6989586621679366963 :: Bool) Source # | |
Defined in Data.Singletons.Prelude.Bool |
data a6989586621679366963 ||@#@$$ a6989586621679366964 infixr 2 Source #
Instances
SingI x => SingI ((||@#@$$) x :: TyFun Bool Bool -> Type) Source # | |
SuppressUnusedWarnings ((||@#@$$) a6989586621679366963 :: TyFun Bool Bool -> Type) Source # | |
Defined in Data.Singletons.Prelude.Bool suppressUnusedWarnings :: () Source # | |
type Apply ((||@#@$$) a6989586621679366963 :: TyFun Bool Bool -> Type) (a6989586621679366964 :: Bool) Source # | |
type (||@#@$$$) (a6989586621679366963 :: Bool) (a6989586621679366964 :: Bool) = (||) a6989586621679366963 a6989586621679366964 :: Bool infixr 2 Source #
data Bool_Sym0 a6989586621679365865 Source #
Instances
SingI (Bool_Sym0 :: TyFun a (a ~> (Bool ~> a)) -> Type) Source # | |
SuppressUnusedWarnings (Bool_Sym0 :: TyFun a (a ~> (Bool ~> a)) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Bool suppressUnusedWarnings :: () Source # | |
type Apply (Bool_Sym0 :: TyFun a (a ~> (Bool ~> a)) -> Type) (a6989586621679365865 :: a) Source # | |
data Bool_Sym1 a6989586621679365865 a6989586621679365866 Source #
Instances
SingI d => SingI (Bool_Sym1 d :: TyFun a (Bool ~> a) -> Type) Source # | |
SuppressUnusedWarnings (Bool_Sym1 a6989586621679365865 :: TyFun a (Bool ~> a) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Bool suppressUnusedWarnings :: () Source # | |
type Apply (Bool_Sym1 a6989586621679365865 :: TyFun a (Bool ~> a) -> Type) (a6989586621679365866 :: a) Source # | |
data Bool_Sym2 a6989586621679365865 a6989586621679365866 a6989586621679365867 Source #
Instances
(SingI d1, SingI d2) => SingI (Bool_Sym2 d1 d2 :: TyFun Bool a -> Type) Source # | |
SuppressUnusedWarnings (Bool_Sym2 a6989586621679365865 a6989586621679365866 :: TyFun Bool a -> Type) Source # | |
Defined in Data.Singletons.Prelude.Bool suppressUnusedWarnings :: () Source # | |
type Apply (Bool_Sym2 a6989586621679365865 a6989586621679365866 :: TyFun Bool a -> Type) (a6989586621679365867 :: Bool) Source # | |
type Bool_Sym3 (a6989586621679365865 :: a) (a6989586621679365866 :: a) (a6989586621679365867 :: Bool) = Bool_ a6989586621679365865 a6989586621679365866 a6989586621679365867 :: a Source #
type OtherwiseSym0 = Otherwise :: Bool Source #