singletons-base
Copyright(C) 2018 Ryan Scott
LicenseBSD-style (see LICENSE)
MaintainerRichard Eisenberg (rae@cs.brynmawr.edu)
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageGHC2021

Data.Functor.Const.Singletons

Description

Exports the promoted and singled versions of the Const data type.

Synopsis

The Const singleton

type family Sing :: k -> Type #

Instances

Instances details
type Sing Source # 
Instance details

Defined in Data.Singletons.Base.Instances

type Sing = SVoid
type Sing Source # 
Instance details

Defined in Data.Semigroup.Singletons.Internal.Wrappers

type Sing = SAll
type Sing Source # 
Instance details

Defined in Data.Semigroup.Singletons.Internal.Wrappers

type Sing = SAny
type Sing Source # 
Instance details

Defined in Data.Singletons.Base.Instances

type Sing Source # 
Instance details

Defined in Data.Singletons.Base.TypeError

type Sing Source # 
Instance details

Defined in GHC.TypeLits.Singletons.Internal

type Sing = SNat
type Sing Source # 
Instance details

Defined in Data.Singletons.Base.Instances

type Sing = STuple0
type Sing Source # 
Instance details

Defined in Data.Singletons.Base.Instances

type Sing = SBool
type Sing Source # 
Instance details

Defined in GHC.TypeLits.Singletons.Internal

type Sing = SChar
type Sing Source # 
Instance details

Defined in GHC.TypeLits.Singletons.Internal

type Sing = SSymbol
type Sing Source # 
Instance details

Defined in Data.Semigroup.Singletons.Internal.Wrappers

type Sing = SFirst :: First a -> Type
type Sing Source # 
Instance details

Defined in Data.Semigroup.Singletons.Internal.Wrappers

type Sing = SLast :: Last a -> Type
type Sing Source # 
Instance details

Defined in Data.Semigroup.Singletons.Internal.Wrappers

type Sing = SMax :: Max a -> Type
type Sing Source # 
Instance details

Defined in Data.Semigroup.Singletons.Internal.Wrappers

type Sing = SMin :: Min a -> Type
type Sing Source # 
Instance details

Defined in Data.Semigroup.Singletons.Internal.Wrappers

type Sing Source # 
Instance details

Defined in Data.Singletons.Base.Instances

type Sing = SNonEmpty :: NonEmpty a -> Type
type Sing Source # 
Instance details

Defined in Data.Singletons.Base.Instances

type Sing = SIdentity :: Identity a -> Type
type Sing Source # 
Instance details

Defined in Data.Monoid.Singletons

type Sing = SFirst :: First a -> Type
type Sing Source # 
Instance details

Defined in Data.Monoid.Singletons

type Sing = SLast :: Last a -> Type
type Sing Source # 
Instance details

Defined in Data.Ord.Singletons

type Sing = SDown :: Down a -> Type
type Sing Source # 
Instance details

Defined in Data.Semigroup.Singletons.Internal.Wrappers

type Sing = SDual :: Dual a -> Type
type Sing Source # 
Instance details

Defined in Data.Semigroup.Singletons.Internal.Wrappers

type Sing = SProduct :: Product a -> Type
type Sing Source # 
Instance details

Defined in Data.Semigroup.Singletons.Internal.Wrappers

type Sing = SSum :: Sum a -> Type
type Sing Source # 
Instance details

Defined in Data.Singletons.Base.Instances

type Sing = SMaybe :: Maybe a -> Type
type Sing Source #

A choice of singleton for the kind TYPE rep (for some RuntimeRep rep), an instantiation of which is the famous kind Type.

Conceivably, one could generalize this instance to `Sing @k` for any kind k, and remove all other Sing instances. We don't adopt this design, however, since it is far more convenient in practice to work with explicit singleton values than TypeReps (for instance, TypeReps are more difficult to pattern match on, and require extra runtime checks).

We cannot produce explicit singleton values for everything in TYPE rep, however, since it is an open kind, so we reach for TypeRep in this one particular case.

Instance details

Defined in Data.Singletons.Base.TypeRepTYPE

type Sing = TypeRep :: TYPE rep -> Type
type Sing Source # 
Instance details

Defined in Data.Singletons.Base.Instances

type Sing = SList :: [a] -> Type
type Sing Source # 
Instance details

Defined in Data.Semigroup.Singletons

type Sing = SArg :: Arg a b -> Type
type Sing Source # 
Instance details

Defined in Data.Singletons.Base.Instances

type Sing = SEither :: Either a b -> Type
type Sing Source # 
Instance details

Defined in Data.Proxy.Singletons

type Sing = SProxy :: Proxy t -> Type
type Sing # 
Instance details

Defined in Data.Singletons

type Sing # 
Instance details

Defined in Data.Singletons

type Sing = SLambda :: (k1 ~> k2) -> Type
type Sing # 
Instance details

Defined in Data.Singletons.Sigma

type Sing = SSigma :: Sigma s t -> Type
type Sing Source # 
Instance details

Defined in Data.Singletons.Base.Instances

type Sing = STuple2 :: (a, b) -> Type
type Sing Source # 
Instance details

Defined in Data.Functor.Const.Singletons

type Sing = SConst :: Const a b -> Type
type Sing Source # 
Instance details

Defined in Data.Singletons.Base.Instances

type Sing = STuple3 :: (a, b, c) -> Type
type Sing Source # 
Instance details

Defined in Data.Functor.Product.Singletons

type Sing = SProduct :: Product f g a -> Type
type Sing Source # 
Instance details

Defined in Data.Functor.Sum.Singletons

type Sing = SSum :: Sum f g a -> Type
type Sing Source # 
Instance details

Defined in Data.Singletons.Base.Instances

type Sing = STuple4 :: (a, b, c, d) -> Type
type Sing Source # 
Instance details

Defined in Data.Functor.Compose.Singletons

type Sing = SCompose :: Compose f g a -> Type
type Sing Source # 
Instance details

Defined in Data.Singletons.Base.Instances

type Sing = STuple5 :: (a, b, c, d, e) -> Type
type Sing Source # 
Instance details

Defined in Data.Singletons.Base.Instances

type Sing = STuple6 :: (a, b, c, d, e, f) -> Type
type Sing Source # 
Instance details

Defined in Data.Singletons.Base.Instances

type Sing = STuple7 :: (a, b, c, d, e, f, g) -> Type

data SConst (a1 :: Const a b) where Source #

Constructors

SConst :: forall {k} a (b :: k) (n :: a). Sing n -> SConst ('Const n :: Const a b) 

Instances

Instances details
SDecide a => TestCoercion (SConst :: Const a b -> Type) Source # 
Instance details

Defined in Data.Functor.Const.Singletons

Methods

testCoercion :: forall (a0 :: Const a b) (b0 :: Const a b). SConst a0 -> SConst b0 -> Maybe (Coercion a0 b0) #

SDecide a => TestEquality (SConst :: Const a b -> Type) Source # 
Instance details

Defined in Data.Functor.Const.Singletons

Methods

testEquality :: forall (a0 :: Const a b) (b0 :: Const a b). SConst a0 -> SConst b0 -> Maybe (a0 :~: b0) #

Eq (SConst z) Source # 
Instance details

Defined in Data.Functor.Const.Singletons

Methods

(==) :: SConst z -> SConst z -> Bool #

(/=) :: SConst z -> SConst z -> Bool #

Ord (SConst z) Source # 
Instance details

Defined in Data.Functor.Const.Singletons

Methods

compare :: SConst z -> SConst z -> Ordering #

(<) :: SConst z -> SConst z -> Bool #

(<=) :: SConst z -> SConst z -> Bool #

(>) :: SConst z -> SConst z -> Bool #

(>=) :: SConst z -> SConst z -> Bool #

max :: SConst z -> SConst z -> SConst z #

min :: SConst z -> SConst z -> SConst z #

type family GetConst (a1 :: Const a b) :: a where ... Source #

Equations

GetConst ('Const field :: Const a b) = field 

sGetConst :: forall {k} a (b :: k) (t :: Const a b). Sing t -> Sing (GetConst t) Source #

Defunctionalization symbols

data ConstSym0 (a1 :: TyFun a (Const a b)) Source #

Instances

Instances details
SingI (ConstSym0 :: TyFun a (Const a b) -> Type) Source # 
Instance details

Defined in Data.Functor.Const.Singletons

Methods

sing :: Sing (ConstSym0 :: TyFun a (Const a b) -> Type) #

SuppressUnusedWarnings (ConstSym0 :: TyFun a (Const a b) -> Type) Source # 
Instance details

Defined in Data.Functor.Const.Singletons

type Apply (ConstSym0 :: TyFun a (Const a b) -> Type) (a6989586621680067841 :: a) Source # 
Instance details

Defined in Data.Functor.Const.Singletons

type Apply (ConstSym0 :: TyFun a (Const a b) -> Type) (a6989586621680067841 :: a) = 'Const a6989586621680067841 :: Const a b

type family ConstSym1 (a6989586621680067841 :: a) :: Const a b where ... Source #

Equations

ConstSym1 (a6989586621680067841 :: a) = 'Const a6989586621680067841 :: Const a b 

data GetConstSym0 (a1 :: TyFun (Const a b) a) Source #

Instances

Instances details
SingI (GetConstSym0 :: TyFun (Const a b) a -> Type) Source # 
Instance details

Defined in Data.Functor.Const.Singletons

Methods

sing :: Sing (GetConstSym0 :: TyFun (Const a b) a -> Type) #

SuppressUnusedWarnings (GetConstSym0 :: TyFun (Const a b) a -> Type) Source # 
Instance details

Defined in Data.Functor.Const.Singletons

type Apply (GetConstSym0 :: TyFun (Const a b) a -> Type) (a6989586621680067844 :: Const a b) Source # 
Instance details

Defined in Data.Functor.Const.Singletons

type Apply (GetConstSym0 :: TyFun (Const a b) a -> Type) (a6989586621680067844 :: Const a b) = GetConst a6989586621680067844

type family GetConstSym1 (a6989586621680067844 :: Const a b) :: a where ... Source #

Equations

GetConstSym1 (a6989586621680067844 :: Const a b) = GetConst a6989586621680067844 

Orphan instances

SingI1 ('Const :: k1 -> Const k1 b) Source # 
Instance details

Methods

liftSing :: forall (x :: k1). Sing x -> Sing ('Const x :: Const k1 b) #

PApplicative (Const m :: Type -> Type) Source # 
Instance details

PFunctor (Const m :: Type -> Type) Source # 
Instance details

SMonoid m => SApplicative (Const m :: Type -> Type) Source # 
Instance details

Methods

sPure :: forall a (t :: a). Sing t -> Sing (Pure t :: Const m a) Source #

(%<*>) :: forall a b (t1 :: Const m (a ~> b)) (t2 :: Const m a). Sing t1 -> Sing t2 -> Sing (t1 <*> t2) Source #

sLiftA2 :: forall a b c (t1 :: a ~> (b ~> c)) (t2 :: Const m a) (t3 :: Const m b). Sing t1 -> Sing t2 -> Sing t3 -> Sing (LiftA2 t1 t2 t3) Source #

(%*>) :: forall a b (t1 :: Const m a) (t2 :: Const m b). Sing t1 -> Sing t2 -> Sing (t1 *> t2) Source #

(%<*) :: forall a b (t1 :: Const m a) (t2 :: Const m b). Sing t1 -> Sing t2 -> Sing (t1 <* t2) Source #

SFunctor (Const m :: Type -> Type) Source # 
Instance details

Methods

sFmap :: forall a b (t1 :: a ~> b) (t2 :: Const m a). Sing t1 -> Sing t2 -> Sing (Fmap t1 t2) Source #

(%<$) :: forall a b (t1 :: a) (t2 :: Const m b). Sing t1 -> Sing t2 -> Sing (t1 <$ t2) Source #

PFoldable (Const m :: Type -> Type) Source # 
Instance details

SFoldable (Const m :: Type -> Type) Source # 
Instance details

Methods

sFold :: forall m0 (t1 :: Const m m0). SMonoid m0 => Sing t1 -> Sing (Fold t1) Source #

sFoldMap :: forall a m0 (t1 :: a ~> m0) (t2 :: Const m a). SMonoid m0 => Sing t1 -> Sing t2 -> Sing (FoldMap t1 t2) Source #

sFoldr :: forall a b (t1 :: a ~> (b ~> b)) (t2 :: b) (t3 :: Const m a). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Foldr t1 t2 t3) Source #

sFoldr' :: forall a b (t1 :: a ~> (b ~> b)) (t2 :: b) (t3 :: Const m a). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Foldr' t1 t2 t3) Source #

sFoldl :: forall b a (t1 :: b ~> (a ~> b)) (t2 :: b) (t3 :: Const m a). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Foldl t1 t2 t3) Source #

sFoldl' :: forall b a (t1 :: b ~> (a ~> b)) (t2 :: b) (t3 :: Const m a). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Foldl' t1 t2 t3) Source #

sFoldr1 :: forall a (t1 :: a ~> (a ~> a)) (t2 :: Const m a). Sing t1 -> Sing t2 -> Sing (Foldr1 t1 t2) Source #

sFoldl1 :: forall a (t1 :: a ~> (a ~> a)) (t2 :: Const m a). Sing t1 -> Sing t2 -> Sing (Foldl1 t1 t2) Source #

sToList :: forall a (t1 :: Const m a). Sing t1 -> Sing (ToList t1) Source #

sNull :: forall a (t1 :: Const m a). Sing t1 -> Sing (Null t1) Source #

sLength :: forall a (t1 :: Const m a). Sing t1 -> Sing (Length t1) Source #

sElem :: forall a (t1 :: a) (t2 :: Const m a). SEq a => Sing t1 -> Sing t2 -> Sing (Elem t1 t2) Source #

sMaximum :: forall a (t1 :: Const m a). SOrd a => Sing t1 -> Sing (Maximum t1) Source #

sMinimum :: forall a (t1 :: Const m a). SOrd a => Sing t1 -> Sing (Minimum t1) Source #

sSum :: forall a (t1 :: Const m a). SNum a => Sing t1 -> Sing (Sum t1) Source #

sProduct :: forall a (t1 :: Const m a). SNum a => Sing t1 -> Sing (Product t1) Source #

SingKind a => SingKind (Const a b) Source # 
Instance details

Associated Types

type Demote (Const a b) 
Instance details

Defined in Data.Functor.Const.Singletons

type Demote (Const a b) = Const (Demote a) b

Methods

fromSing :: forall (a0 :: Const a b). Sing a0 -> Demote (Const a b) #

toSing :: Demote (Const a b) -> SomeSing (Const a b) #

SDecide a => SDecide (Const a b) Source # 
Instance details

Methods

(%~) :: forall (a0 :: Const a b) (b0 :: Const a b). Sing a0 -> Sing b0 -> Decision (a0 :~: b0) #

PEq (Const a b) Source # 
Instance details

SEq a => SEq (Const a b) Source # 
Instance details

Methods

(%==) :: forall (t1 :: Const a b) (t2 :: Const a b). Sing t1 -> Sing t2 -> Sing (t1 == t2) Source #

(%/=) :: forall (t1 :: Const a b) (t2 :: Const a b). Sing t1 -> Sing t2 -> Sing (t1 /= t2) Source #

PMonoid (Const a b) Source # 
Instance details

Associated Types

type Mempty 
Instance details

Defined in Data.Functor.Const.Singletons

type Mempty
SMonoid a => SMonoid (Const a b) Source # 
Instance details

Methods

sMempty :: Sing (Mempty :: Const a b) Source #

sMappend :: forall (t1 :: Const a b) (t2 :: Const a b). Sing t1 -> Sing t2 -> Sing (Mappend t1 t2) Source #

sMconcat :: forall (t :: [Const a b]). Sing t -> Sing (Mconcat t) Source #

POrd (Const a b) Source # 
Instance details

SOrd a => SOrd (Const a b) Source # 
Instance details

Methods

sCompare :: forall (t1 :: Const a b) (t2 :: Const a b). Sing t1 -> Sing t2 -> Sing (Compare t1 t2) Source #

(%<) :: forall (t1 :: Const a b) (t2 :: Const a b). Sing t1 -> Sing t2 -> Sing (t1 < t2) Source #

(%<=) :: forall (t1 :: Const a b) (t2 :: Const a b). Sing t1 -> Sing t2 -> Sing (t1 <= t2) Source #

(%>) :: forall (t1 :: Const a b) (t2 :: Const a b). Sing t1 -> Sing t2 -> Sing (t1 > t2) Source #

(%>=) :: forall (t1 :: Const a b) (t2 :: Const a b). Sing t1 -> Sing t2 -> Sing (t1 >= t2) Source #

sMax :: forall (t1 :: Const a b) (t2 :: Const a b). Sing t1 -> Sing t2 -> Sing (Max t1 t2) Source #

sMin :: forall (t1 :: Const a b) (t2 :: Const a b). Sing t1 -> Sing t2 -> Sing (Min t1 t2) Source #

PSemigroup (Const a b) Source # 
Instance details

SSemigroup a => SSemigroup (Const a b) Source # 
Instance details

Methods

(%<>) :: forall (t1 :: Const a b) (t2 :: Const a b). Sing t1 -> Sing t2 -> Sing (t1 <> t2) Source #

sSconcat :: forall (t :: NonEmpty (Const a b)). Sing t -> Sing (Sconcat t) Source #

PBounded (Const a b) Source # 
Instance details

Associated Types

type MinBound 
Instance details

Defined in Data.Functor.Const.Singletons

type MaxBound 
Instance details

Defined in Data.Functor.Const.Singletons

PEnum (Const a b) Source # 
Instance details

SBounded a => SBounded (Const a b) Source # 
Instance details

SEnum a => SEnum (Const a b) Source # 
Instance details

Methods

sSucc :: forall (t :: Const a b). Sing t -> Sing (Succ t) Source #

sPred :: forall (t :: Const a b). Sing t -> Sing (Pred t) Source #

sToEnum :: forall (t :: Natural). Sing t -> Sing (ToEnum t :: Const a b) Source #

sFromEnum :: forall (t :: Const a b). Sing t -> Sing (FromEnum t) Source #

sEnumFromTo :: forall (t1 :: Const a b) (t2 :: Const a b). Sing t1 -> Sing t2 -> Sing (EnumFromTo t1 t2) Source #

sEnumFromThenTo :: forall (t1 :: Const a b) (t2 :: Const a b) (t3 :: Const a b). Sing t1 -> Sing t2 -> Sing t3 -> Sing (EnumFromThenTo t1 t2 t3) Source #

PNum (Const a b) Source # 
Instance details

SNum a => SNum (Const a b) Source # 
Instance details

Methods

(%+) :: forall (t1 :: Const a b) (t2 :: Const a b). Sing t1 -> Sing t2 -> Sing (t1 + t2) Source #

(%-) :: forall (t1 :: Const a b) (t2 :: Const a b). Sing t1 -> Sing t2 -> Sing (t1 - t2) Source #

(%*) :: forall (t1 :: Const a b) (t2 :: Const a b). Sing t1 -> Sing t2 -> Sing (t1 * t2) Source #

sNegate :: forall (t :: Const a b). Sing t -> Sing (Negate t) Source #

sAbs :: forall (t :: Const a b). Sing t -> Sing (Abs t) Source #

sSignum :: forall (t :: Const a b). Sing t -> Sing (Signum t) Source #

sFromInteger :: forall (t :: Natural). Sing t -> Sing (FromInteger t :: Const a b) Source #

PShow (Const a b) Source # 
Instance details

SShow a => SShow (Const a b) Source # 
Instance details

Methods

sShowsPrec :: forall (t1 :: Natural) (t2 :: Const a b) (t3 :: Symbol). Sing t1 -> Sing t2 -> Sing t3 -> Sing (ShowsPrec t1 t2 t3) Source #

sShow_ :: forall (t :: Const a b). Sing t -> Sing (Show_ t) Source #

sShowList :: forall (t1 :: [Const a b]) (t2 :: Symbol). Sing t1 -> Sing t2 -> Sing (ShowList t1 t2) Source #

SingI n => SingI ('Const n :: Const a b) Source # 
Instance details

Methods

sing :: Sing ('Const n :: Const a b) #