Copyright | (C) 2018 Ryan Scott |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Richard Eisenberg (rae@cs.brynmawr.edu) |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
Exports the promoted and singled versions of the Const
data type.
Synopsis
- type family Sing :: k -> Type
- data SConst :: forall (k :: Type) (a :: Type) (b :: k). Const a b -> Type where
- type family GetConst (x :: Const a b) :: a where ...
- data ConstSym0 :: forall (a6989586621679097555 :: Type) k6989586621679097554 (b6989586621679097556 :: k6989586621679097554). (~>) a6989586621679097555 (Const (a6989586621679097555 :: Type) (b6989586621679097556 :: k6989586621679097554))
- type ConstSym1 (t6989586621680758421 :: a6989586621679097555) = 'Const t6989586621680758421
- data GetConstSym0 :: forall a6989586621680758689 b6989586621680758690. (~>) (Const a6989586621680758689 b6989586621680758690) a6989586621680758689
- type GetConstSym1 (x6989586621680758691 :: Const a6989586621680758689 b6989586621680758690) = GetConst x6989586621680758691
The Const
singleton
type family Sing :: k -> Type Source #
The singleton kind-indexed type family.
Instances
data SConst :: forall (k :: Type) (a :: Type) (b :: k). Const a b -> Type where Source #
Instances
SDecide a => TestCoercion (SConst :: Const a b -> Type) Source # | |
Defined in Data.Singletons.Prelude.Const | |
SDecide a => TestEquality (SConst :: Const a b -> Type) Source # | |
Defined in Data.Singletons.Prelude.Const |
Defunctionalization symbols
data ConstSym0 :: forall (a6989586621679097555 :: Type) k6989586621679097554 (b6989586621679097556 :: k6989586621679097554). (~>) a6989586621679097555 (Const (a6989586621679097555 :: Type) (b6989586621679097556 :: k6989586621679097554)) Source #
Instances
SingI (ConstSym0 :: TyFun a6989586621679097555 (Const a6989586621679097555 b6989586621679097556) -> Type) Source # | |
SuppressUnusedWarnings (ConstSym0 :: TyFun a6989586621679097555 (Const a6989586621679097555 b6989586621679097556) -> Type) Source # | |
Defined in Data.Singletons.Prelude.Const suppressUnusedWarnings :: () Source # | |
type Apply (ConstSym0 :: TyFun a (Const a b6989586621679097556) -> Type) (t6989586621680758421 :: a) Source # | |
type ConstSym1 (t6989586621680758421 :: a6989586621679097555) = 'Const t6989586621680758421 Source #
data GetConstSym0 :: forall a6989586621680758689 b6989586621680758690. (~>) (Const a6989586621680758689 b6989586621680758690) a6989586621680758689 Source #
Instances
SuppressUnusedWarnings (GetConstSym0 :: TyFun (Const a6989586621680758689 b6989586621680758690) a6989586621680758689 -> Type) Source # | |
Defined in Data.Singletons.Prelude.Const suppressUnusedWarnings :: () Source # | |
type Apply (GetConstSym0 :: TyFun (Const a b) a -> Type) (x6989586621680758691 :: Const a b) Source # | |
Defined in Data.Singletons.Prelude.Const |
type GetConstSym1 (x6989586621680758691 :: Const a6989586621680758689 b6989586621680758690) = GetConst x6989586621680758691 Source #
Orphan instances
SMonoid m => SApplicative (Const m :: Type -> Type) Source # | |
sPure :: forall a (t :: a). Sing t -> Sing (Apply PureSym0 t) Source # (%<*>) :: forall a b (t :: Const m (a ~> b)) (t :: Const m a). Sing t -> Sing t -> Sing (Apply (Apply (<*>@#@$) t) t) Source # sLiftA2 :: forall a b c (t :: a ~> (b ~> c)) (t :: Const m a) (t :: Const m b). Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply LiftA2Sym0 t) t) t) Source # (%*>) :: forall a b (t :: Const m a) (t :: Const m b). Sing t -> Sing t -> Sing (Apply (Apply (*>@#@$) t) t) Source # (%<*) :: forall a b (t :: Const m a) (t :: Const m b). Sing t -> Sing t -> Sing (Apply (Apply (<*@#@$) t) t) Source # | |
SFunctor (Const m :: Type -> Type) Source # | |
PApplicative (Const m :: Type -> Type) Source # | |
PFunctor (Const m :: Type -> Type) Source # | |
SFoldable (Const m :: Type -> Type) Source # | |
sFold :: forall m0 (t :: Const m m0). SMonoid m0 => Sing t -> Sing (Apply FoldSym0 t) Source # sFoldMap :: forall a m0 (t :: a ~> m0) (t :: Const m a). SMonoid m0 => Sing t -> Sing t -> Sing (Apply (Apply FoldMapSym0 t) t) Source # sFoldr :: forall a b (t :: a ~> (b ~> b)) (t :: b) (t :: Const m a). Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply FoldrSym0 t) t) t) Source # sFoldr' :: forall a b (t :: a ~> (b ~> b)) (t :: b) (t :: Const m a). Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply Foldr'Sym0 t) t) t) Source # sFoldl :: forall b a (t :: b ~> (a ~> b)) (t :: b) (t :: Const m a). Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply FoldlSym0 t) t) t) Source # sFoldl' :: forall b a (t :: b ~> (a ~> b)) (t :: b) (t :: Const m a). Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply Foldl'Sym0 t) t) t) Source # sFoldr1 :: forall a (t :: a ~> (a ~> a)) (t :: Const m a). Sing t -> Sing t -> Sing (Apply (Apply Foldr1Sym0 t) t) Source # sFoldl1 :: forall a (t :: a ~> (a ~> a)) (t :: Const m a). Sing t -> Sing t -> Sing (Apply (Apply Foldl1Sym0 t) t) Source # sToList :: forall a (t :: Const m a). Sing t -> Sing (Apply ToListSym0 t) Source # sNull :: forall a (t :: Const m a). Sing t -> Sing (Apply NullSym0 t) Source # sLength :: forall a (t :: Const m a). Sing t -> Sing (Apply LengthSym0 t) Source # sElem :: forall a (t :: a) (t :: Const m a). SEq a => Sing t -> Sing t -> Sing (Apply (Apply ElemSym0 t) t) Source # sMaximum :: forall a (t :: Const m a). SOrd a => Sing t -> Sing (Apply MaximumSym0 t) Source # sMinimum :: forall a (t :: Const m a). SOrd a => Sing t -> Sing (Apply MinimumSym0 t) Source # sSum :: forall a (t :: Const m a). SNum a => Sing t -> Sing (Apply SumSym0 t) Source # sProduct :: forall a (t :: Const m a). SNum a => Sing t -> Sing (Apply ProductSym0 t) Source # | |
PFoldable (Const m :: Type -> Type) Source # | |
type FoldMap arg arg :: m Source # type Foldr arg arg arg :: b Source # type Foldr' arg arg arg :: b Source # type Foldl arg arg arg :: b Source # type Foldl' arg arg arg :: b Source # type Foldr1 arg arg :: a Source # type Foldl1 arg arg :: a Source # type ToList arg :: [a] Source # type Null arg :: Bool Source # type Length arg :: Nat Source # type Elem arg arg :: Bool Source # type Maximum arg :: a Source # | |
SingKind a => SingKind (Const a b) Source # | |
SDecide a => SDecide (Const a b) Source # | |
PEq (Const a b) Source # | |
SEq a => SEq (Const a b) Source # | |
SOrd a => SOrd (Const a b) Source # | |
sCompare :: forall (t :: Const a b) (t :: Const a b). Sing t -> Sing t -> Sing (Apply (Apply CompareSym0 t) t) Source # (%<) :: forall (t :: Const a b) (t :: Const a b). Sing t -> Sing t -> Sing (Apply (Apply (<@#@$) t) t) Source # (%<=) :: forall (t :: Const a b) (t :: Const a b). Sing t -> Sing t -> Sing (Apply (Apply (<=@#@$) t) t) Source # (%>) :: forall (t :: Const a b) (t :: Const a b). Sing t -> Sing t -> Sing (Apply (Apply (>@#@$) t) t) Source # (%>=) :: forall (t :: Const a b) (t :: Const a b). Sing t -> Sing t -> Sing (Apply (Apply (>=@#@$) t) t) Source # sMax :: forall (t :: Const a b) (t :: Const a b). Sing t -> Sing t -> Sing (Apply (Apply MaxSym0 t) t) Source # sMin :: forall (t :: Const a b) (t :: Const a b). Sing t -> Sing t -> Sing (Apply (Apply MinSym0 t) t) Source # | |
POrd (Const a b) Source # | |
SNum a => SNum (Const a b) Source # | |
(%+) :: forall (t :: Const a b) (t :: Const a b). Sing t -> Sing t -> Sing (Apply (Apply (+@#@$) t) t) Source # (%-) :: forall (t :: Const a b) (t :: Const a b). Sing t -> Sing t -> Sing (Apply (Apply (-@#@$) t) t) Source # (%*) :: forall (t :: Const a b) (t :: Const a b). Sing t -> Sing t -> Sing (Apply (Apply (*@#@$) t) t) Source # sNegate :: forall (t :: Const a b). Sing t -> Sing (Apply NegateSym0 t) Source # sAbs :: forall (t :: Const a b). Sing t -> Sing (Apply AbsSym0 t) Source # sSignum :: forall (t :: Const a b). Sing t -> Sing (Apply SignumSym0 t) Source # sFromInteger :: forall (t :: Nat). Sing t -> Sing (Apply FromIntegerSym0 t) Source # | |
PNum (Const a b) Source # | |
SBounded a => SBounded (Const a b) Source # | |
PBounded (Const a b) Source # | |
SEnum a => SEnum (Const a b) Source # | |
sSucc :: forall (t :: Const a b). Sing t -> Sing (Apply SuccSym0 t) Source # sPred :: forall (t :: Const a b). Sing t -> Sing (Apply PredSym0 t) Source # sToEnum :: forall (t :: Nat). Sing t -> Sing (Apply ToEnumSym0 t) Source # sFromEnum :: forall (t :: Const a b). Sing t -> Sing (Apply FromEnumSym0 t) Source # sEnumFromTo :: forall (t :: Const a b) (t :: Const a b). Sing t -> Sing t -> Sing (Apply (Apply EnumFromToSym0 t) t) Source # sEnumFromThenTo :: forall (t :: Const a b) (t :: Const a b) (t :: Const a b). Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply EnumFromThenToSym0 t) t) t) Source # | |
PEnum (Const a b) Source # | |
SSemigroup a => SSemigroup (Const a b) Source # | |
PSemigroup (Const a b) Source # | |
SShow a => SShow (Const a b) Source # | |
sShowsPrec :: forall (t :: Nat) (t :: Const a b) (t :: Symbol). Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply ShowsPrecSym0 t) t) t) Source # sShow_ :: forall (t :: Const a b). Sing t -> Sing (Apply Show_Sym0 t) Source # sShowList :: forall (t :: [Const a b]) (t :: Symbol). Sing t -> Sing t -> Sing (Apply (Apply ShowListSym0 t) t) Source # | |
PShow (Const a b) Source # | |
SMonoid a => SMonoid (Const a b) Source # | |
PMonoid (Const a b) Source # | |
SingI a2 => SingI ('Const a2 :: Const a1 b) Source # | |