| 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 |
Data.Singletons.Prelude.Bool
Description
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
- data family Sing :: k -> Type
- type SBool = (Sing :: Bool -> Type)
- 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 :: a) (a :: Bool) :: 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 :: Bool where ...
- sOtherwise :: Sing (OtherwiseSym0 :: Bool)
- type TrueSym0 = True
- type FalseSym0 = False
- data NotSym0 :: (~>) Bool Bool
- type NotSym1 (a6989586621679378735 :: Bool) = Not a6989586621679378735
- data (&&@#@$) :: (~>) Bool ((~>) Bool Bool)
- data (&&@#@$$) (a6989586621679378194 :: Bool) :: (~>) Bool Bool
- type (&&@#@$$$) (a6989586621679378194 :: Bool) (b6989586621679378195 :: Bool) = (&&) a6989586621679378194 b6989586621679378195
- data (||@#@$) :: (~>) Bool ((~>) Bool Bool)
- data (||@#@$$) (a6989586621679378435 :: Bool) :: (~>) Bool Bool
- type (||@#@$$$) (a6989586621679378435 :: Bool) (b6989586621679378436 :: Bool) = (||) a6989586621679378435 b6989586621679378436
- data Bool_Sym0 :: forall a6989586621679377443. (~>) a6989586621679377443 ((~>) a6989586621679377443 ((~>) Bool a6989586621679377443))
- data Bool_Sym1 (a6989586621679377449 :: a6989586621679377443) :: (~>) a6989586621679377443 ((~>) Bool a6989586621679377443)
- data Bool_Sym2 (a6989586621679377449 :: a6989586621679377443) (a6989586621679377450 :: a6989586621679377443) :: (~>) Bool a6989586621679377443
- type Bool_Sym3 (a6989586621679377449 :: a6989586621679377443) (a6989586621679377450 :: a6989586621679377443) (a6989586621679377451 :: Bool) = Bool_ a6989586621679377449 a6989586621679377450 a6989586621679377451
- type OtherwiseSym0 = Otherwise
The Bool singleton
data family Sing :: k -> Type #
The singleton kind-indexed data family.
Instances
| SDecide k => TestCoercion (Sing :: k -> Type) # | |
Defined in Data.Singletons.Decide | |
| SDecide k => TestEquality (Sing :: k -> Type) # | |
Defined in Data.Singletons.Decide | |
| Show (SSymbol s) # | |
| Show (SNat n) # | |
| Eq (Sing a) # | |
| Ord (Sing a) # | |
| Show (Sing z) # | |
| (ShowSing a, ShowSing [a]) => Show (Sing z) # | |
| ShowSing a => Show (Sing z) # | |
| Show (Sing z) # | |
| (ShowSing a, ShowSing b) => Show (Sing z) # | |
| Show (Sing a) # | |
| Show (Sing z) # | |
| (ShowSing a, ShowSing b) => Show (Sing z) # | |
| (ShowSing a, ShowSing b, ShowSing c) => Show (Sing z) # | |
| (ShowSing a, ShowSing b, ShowSing c, ShowSing d) => Show (Sing z) # | |
| (ShowSing a, ShowSing b, ShowSing c, ShowSing d, ShowSing e) => Show (Sing z) # | |
| (ShowSing a, ShowSing b, ShowSing c, ShowSing d, ShowSing e, ShowSing f) => Show (Sing z) # | |
| (ShowSing a, ShowSing b, ShowSing c, ShowSing d, ShowSing e, ShowSing f, ShowSing g) => Show (Sing z) # | |
| Show (Sing z) # | |
| ShowSing a => Show (Sing z) # | |
| ShowSing a => Show (Sing z) # | |
| (ShowSing a, ShowSing b) => Show (Sing z) # | |
| ShowSing a => Show (Sing z) # | |
| ShowSing a => Show (Sing z) # | |
| ShowSing m => Show (Sing z) # | |
| ShowSing (Maybe a) => Show (Sing z) # | |
| ShowSing a => Show (Sing z) # | |
| ShowSing (Maybe a) => Show (Sing z) # | |
| ShowSing (Maybe a) => Show (Sing z) # | |
| ShowSing a => Show (Sing z) # | |
| ShowSing Bool => Show (Sing z) # | |
| ShowSing Bool => Show (Sing z) # | |
| ShowSing a => Show (Sing z) # | |
| ShowSing a => Show (Sing z) # | |
| (ShowSing a, ShowSing [a]) => Show (Sing z) # | |
| data Sing (a :: Bool) # | |
| data Sing (a :: Ordering) # | |
| data Sing (n :: Nat) # | |
| data Sing (n :: Symbol) # | |
Defined in Data.Singletons.TypeLits.Internal | |
| data Sing (a :: ()) # | |
Defined in Data.Singletons.Prelude.Instances | |
| data Sing (a :: Void) # | |
Defined in Data.Singletons.Prelude.Instances | |
| data Sing (a :: All) # | |
| data Sing (a :: Any) # | |
| data Sing (a :: PErrorMessage) # | |
Defined in Data.Singletons.TypeError data Sing (a :: PErrorMessage) where
| |
| data Sing (b :: [a]) # | |
| data Sing (b :: Maybe a) # | |
| newtype Sing (a :: TYPE rep) # | A choice of singleton for the kind Conceivably, one could generalize this instance to `Sing :: k -> Type` for
any kind We cannot produce explicit singleton values for everything in |
Defined in Data.Singletons.TypeRepTYPE | |
| data Sing (b :: Min a) # | |
| data Sing (b :: Max a) # | |
| data Sing (b :: First a) # | |
| data Sing (b :: Last a) # | |
| data Sing (a :: WrappedMonoid m) # | |
Defined in Data.Singletons.Prelude.Semigroup.Internal data Sing (a :: WrappedMonoid m) where
| |
| data Sing (b :: Option a) # | |
| data Sing (b :: Identity a) # | |
| data Sing (b :: First a) # | |
| data Sing (b :: Last a) # | |
| data Sing (b :: Dual a) # | |
| data Sing (b :: Sum a) # | |
| data Sing (b :: Product a) # | |
| data Sing (b :: Down a) # | |
| data Sing (b :: NonEmpty a) # | |
| data Sing (c :: Either a b) # | |
| data Sing (c :: (a, b)) # | |
| data Sing (c :: Arg a b) # | |
| newtype Sing (f :: k1 ~> k2) # | |
| data Sing (d :: (a, b, c)) # | |
| data Sing (c :: Const a b) # | |
| data Sing (e :: (a, b, c, d)) # | |
| data Sing (f :: (a, b, c, d, e)) # | |
| data Sing (g :: (a, b, c, d, e, f)) # | |
| data Sing (h :: (a, b, c, d, e, f, g)) # | |
Defined in Data.Singletons.Prelude.Instances | |
Though Haddock doesn't show it, the Sing instance above declares
constructors
SFalse :: Sing False STrue :: Sing True
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) #
sOtherwise :: Sing (OtherwiseSym0 :: Bool) #
Defunctionalization symbols
data NotSym0 :: (~>) Bool Bool #
Instances
| SingI NotSym0 # | |
Defined in Data.Singletons.Prelude.Bool | |
| SuppressUnusedWarnings NotSym0 # | |
Defined in Data.Singletons.Prelude.Bool Methods suppressUnusedWarnings :: () # | |
| type Apply NotSym0 (a6989586621679378735 :: Bool) # | |
Defined in Data.Singletons.Prelude.Bool | |
data (&&@#@$) :: (~>) Bool ((~>) Bool Bool) infixr 3 #
Instances
| SingI (&&@#@$) # | |
Defined in Data.Singletons.Prelude.Bool | |
| SuppressUnusedWarnings (&&@#@$) # | |
Defined in Data.Singletons.Prelude.Bool Methods suppressUnusedWarnings :: () # | |
| type Apply (&&@#@$) (a6989586621679378194 :: Bool) # | |
Defined in Data.Singletons.Prelude.Bool | |
data (&&@#@$$) (a6989586621679378194 :: Bool) :: (~>) Bool Bool infixr 3 #
Instances
| SingI x => SingI ((&&@#@$$) x :: TyFun Bool Bool -> Type) # | |
Defined in Data.Singletons.Prelude.Bool | |
| SuppressUnusedWarnings ((&&@#@$$) a6989586621679378194 :: TyFun Bool Bool -> Type) # | |
Defined in Data.Singletons.Prelude.Bool Methods suppressUnusedWarnings :: () # | |
| type Apply ((&&@#@$$) a6989586621679378194 :: TyFun Bool Bool -> Type) (b6989586621679378195 :: Bool) # | |
type (&&@#@$$$) (a6989586621679378194 :: Bool) (b6989586621679378195 :: Bool) = (&&) a6989586621679378194 b6989586621679378195 #
data (||@#@$) :: (~>) Bool ((~>) Bool Bool) infixr 2 #
Instances
| SingI (||@#@$) # | |
Defined in Data.Singletons.Prelude.Bool | |
| SuppressUnusedWarnings (||@#@$) # | |
Defined in Data.Singletons.Prelude.Bool Methods suppressUnusedWarnings :: () # | |
| type Apply (||@#@$) (a6989586621679378435 :: Bool) # | |
Defined in Data.Singletons.Prelude.Bool | |
data (||@#@$$) (a6989586621679378435 :: Bool) :: (~>) Bool Bool infixr 2 #
Instances
| SingI x => SingI ((||@#@$$) x :: TyFun Bool Bool -> Type) # | |
Defined in Data.Singletons.Prelude.Bool | |
| SuppressUnusedWarnings ((||@#@$$) a6989586621679378435 :: TyFun Bool Bool -> Type) # | |
Defined in Data.Singletons.Prelude.Bool Methods suppressUnusedWarnings :: () # | |
| type Apply ((||@#@$$) a6989586621679378435 :: TyFun Bool Bool -> Type) (b6989586621679378436 :: Bool) # | |
type (||@#@$$$) (a6989586621679378435 :: Bool) (b6989586621679378436 :: Bool) = (||) a6989586621679378435 b6989586621679378436 #
data Bool_Sym0 :: forall a6989586621679377443. (~>) a6989586621679377443 ((~>) a6989586621679377443 ((~>) Bool a6989586621679377443)) #
Instances
| SingI (Bool_Sym0 :: TyFun a (a ~> (Bool ~> a)) -> Type) # | |
Defined in Data.Singletons.Prelude.Bool | |
| SuppressUnusedWarnings (Bool_Sym0 :: TyFun a6989586621679377443 (a6989586621679377443 ~> (Bool ~> a6989586621679377443)) -> Type) # | |
Defined in Data.Singletons.Prelude.Bool Methods suppressUnusedWarnings :: () # | |
| type Apply (Bool_Sym0 :: TyFun a6989586621679377443 (a6989586621679377443 ~> (Bool ~> a6989586621679377443)) -> Type) (a6989586621679377449 :: a6989586621679377443) # | |
data Bool_Sym1 (a6989586621679377449 :: a6989586621679377443) :: (~>) a6989586621679377443 ((~>) Bool a6989586621679377443) #
Instances
| SingI d => SingI (Bool_Sym1 d :: TyFun a (Bool ~> a) -> Type) # | |
Defined in Data.Singletons.Prelude.Bool | |
| SuppressUnusedWarnings (Bool_Sym1 a6989586621679377449 :: TyFun a6989586621679377443 (Bool ~> a6989586621679377443) -> Type) # | |
Defined in Data.Singletons.Prelude.Bool Methods suppressUnusedWarnings :: () # | |
| type Apply (Bool_Sym1 a6989586621679377449 :: TyFun a6989586621679377443 (Bool ~> a6989586621679377443) -> Type) (a6989586621679377450 :: a6989586621679377443) # | |
data Bool_Sym2 (a6989586621679377449 :: a6989586621679377443) (a6989586621679377450 :: a6989586621679377443) :: (~>) Bool a6989586621679377443 #
Instances
| (SingI d1, SingI d2) => SingI (Bool_Sym2 d1 d2 :: TyFun Bool a -> Type) # | |
Defined in Data.Singletons.Prelude.Bool | |
| SuppressUnusedWarnings (Bool_Sym2 a6989586621679377450 a6989586621679377449 :: TyFun Bool a6989586621679377443 -> Type) # | |
Defined in Data.Singletons.Prelude.Bool Methods suppressUnusedWarnings :: () # | |
| type Apply (Bool_Sym2 a6989586621679377450 a6989586621679377449 :: TyFun Bool a -> Type) (a6989586621679377451 :: Bool) # | |
type Bool_Sym3 (a6989586621679377449 :: a6989586621679377443) (a6989586621679377450 :: a6989586621679377443) (a6989586621679377451 :: Bool) = Bool_ a6989586621679377449 a6989586621679377450 a6989586621679377451 #
type OtherwiseSym0 = Otherwise #