Copyright | Copyright (c) 2016 the Hakaru team |
---|---|
License | BSD3 |
Maintainer | wren@community.haskell.org |
Stability | experimental |
Portability | GHC-only |
Safe Haskell | None |
Language | Haskell2010 |
Singleton types for the Hakaru
kind, and a decision procedure
for Hakaru
type-equality.
- data family Sing (a :: k) :: *
- class SingI a where
- sBool :: Sing HBool
- sUnit :: Sing HUnit
- sPair :: Sing a -> Sing b -> Sing (HPair a b)
- sEither :: Sing a -> Sing b -> Sing (HEither a b)
- sList :: Sing a -> Sing (HList a)
- sMaybe :: Sing a -> Sing (HMaybe a)
- sUnMeasure :: Sing (HMeasure a) -> Sing a
- sUnArray :: Sing (HArray a) -> Sing a
- sUnPair :: Sing (HPair a b) -> (Sing a, Sing b)
- sUnEither :: Sing (HEither a b) -> (Sing a, Sing b)
- sUnList :: Sing (HList a) -> Sing a
- sUnMaybe :: Sing (HMaybe a) -> Sing a
- sSymbol_Bool :: Sing "Bool"
- sSymbol_Unit :: Sing "Unit"
- sSymbol_Pair :: Sing "Pair"
- sSymbol_Either :: Sing "Either"
- sSymbol_List :: Sing "List"
- sSymbol_Maybe :: Sing "Maybe"
Documentation
data family Sing (a :: k) :: * Source #
The data families of singletons for each kind.
A class for automatically generating the singleton for a given Hakaru type.
KnownSymbol s => SingI Symbol s Source # | |
SingI HakaruFun I Source # | |
SingI Hakaru HNat Source # | |
SingI Hakaru HInt Source # | |
SingI Hakaru HProb Source # | |
SingI Hakaru HReal Source # | |
SingI Untyped U Source # | |
KnownSymbol s => SingI HakaruCon (TyCon s) Source # | |
SingI Hakaru a => SingI HakaruFun (K a) Source # | |
SingI Hakaru a => SingI Hakaru (HMeasure a) Source # | |
SingI Hakaru a => SingI Hakaru (HArray a) Source # | |
(SingI HakaruCon a, SingI Hakaru b) => SingI HakaruCon ((:@) a b) Source # | |
(SingI Hakaru a, SingI Hakaru b) => SingI Hakaru ((:->) a b) Source # | |
((~) [[HakaruFun]] sop (Code t), SingI HakaruCon t, SingI [[HakaruFun]] sop) => SingI Hakaru (HData t sop) Source # | |
SingI [[HakaruFun]] ([] [HakaruFun]) Source # | |
SingI [HakaruFun] ([] HakaruFun) Source # | |
(SingI [HakaruFun] xs, SingI [[HakaruFun]] xss) => SingI [[HakaruFun]] ((:) [HakaruFun] xs xss) Source # | |
(SingI HakaruFun x, SingI [HakaruFun] xs) => SingI [HakaruFun] ((:) HakaruFun x xs) Source # | |
Some helpful shorthands for "built-in" datatypes
Constructing singletons
Destructing singletons
Singletons for Symbol
sSymbol_Bool :: Sing "Bool" Source #
sSymbol_Unit :: Sing "Unit" Source #
sSymbol_Pair :: Sing "Pair" Source #
sSymbol_Either :: Sing "Either" Source #
sSymbol_List :: Sing "List" Source #
sSymbol_Maybe :: Sing "Maybe" Source #