singletons-base-3.1.1: A promoted and singled version of the base library
Copyright(C) 2020 Ryan Scott
LicenseBSD-style (see LICENSE)
MaintainerRichard Eisenberg (rae@cs.brynmawr.edu)
Stabilityexperimental
Portabilitynon-portable
Safe HaskellSafe-Inferred
LanguageGHC2021

Data.Proxy.Singletons

Description

Exports promoted and singled versions of the definitions in Data.Proxy.

Synopsis

The Proxy singleton

type family Sing :: k -> Type #

Instances

Instances details
type Sing Source # 
Instance details

Defined in Data.Semigroup.Singletons.Internal

type Sing = SAll
type Sing Source # 
Instance details

Defined in Data.Semigroup.Singletons.Internal

type Sing = SAny
type Sing Source # 
Instance details

Defined in Data.Singletons.Base.Instances

type Sing = SVoid
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.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

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

Defined in Data.Semigroup.Singletons.Internal

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

Defined in Data.Semigroup.Singletons.Internal

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

Defined in Data.Semigroup.Singletons.Internal

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

Defined in Data.Semigroup.Singletons.Internal

type Sing Source # 
Instance details

Defined in Data.Semigroup.Singletons.Internal

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

Defined in Data.Semigroup.Singletons.Internal

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

Defined in Data.Semigroup.Singletons.Internal

type Sing = SSum :: Sum a -> Type
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 = 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.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 Source # 
Instance details

Defined in Data.Semigroup.Singletons

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

Defined in Data.Singletons

type Sing = SWrappedSing :: WrappedSing a -> Type
type Sing 
Instance details

Defined in Data.Singletons

type Sing = SLambda :: (k1 ~> k2) -> 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 SProxy :: Proxy t -> Type where Source #

Constructors

SProxy :: forall t. SProxy ('Proxy @t) 

Instances

Instances details
TestCoercion (SProxy :: Proxy t -> Type) Source # 
Instance details

Defined in Data.Proxy.Singletons

Methods

testCoercion :: forall (a :: k) (b :: k). SProxy a -> SProxy b -> Maybe (Coercion a b) #

TestEquality (SProxy :: Proxy t -> Type) Source # 
Instance details

Defined in Data.Proxy.Singletons

Methods

testEquality :: forall (a :: k) (b :: k). SProxy a -> SProxy b -> Maybe (a :~: b) #

Show (SProxy z) Source # 
Instance details

Defined in Data.Proxy.Singletons

Methods

showsPrec :: Int -> SProxy z -> ShowS #

show :: SProxy z -> String #

showList :: [SProxy z] -> ShowS #

type family AsProxyTypeOf (a :: a) (a :: proxy a) :: a where ... Source #

Equations

AsProxyTypeOf a_6989586621680403091 a_6989586621680403093 = Apply (Apply ConstSym0 a_6989586621680403091) a_6989586621680403093 

sAsProxyTypeOf :: forall a proxy (t :: a) (t :: proxy a). Sing t -> Sing t -> Sing (Apply (Apply AsProxyTypeOfSym0 t) t :: a) Source #

Defunctionalization symbols

type family ProxySym0 where ... Source #

Equations

ProxySym0 = 'Proxy 

data AsProxyTypeOfSym0 :: (~>) a ((~>) (proxy a) a) Source #

Instances

Instances details
SingI (AsProxyTypeOfSym0 :: TyFun a (proxy a ~> a) -> Type) Source # 
Instance details

Defined in Data.Proxy.Singletons

SuppressUnusedWarnings (AsProxyTypeOfSym0 :: TyFun a (proxy a ~> a) -> Type) Source # 
Instance details

Defined in Data.Proxy.Singletons

type Apply (AsProxyTypeOfSym0 :: TyFun a (proxy a ~> a) -> Type) (a6989586621680403098 :: a) Source # 
Instance details

Defined in Data.Proxy.Singletons

type Apply (AsProxyTypeOfSym0 :: TyFun a (proxy a ~> a) -> Type) (a6989586621680403098 :: a) = AsProxyTypeOfSym1 a6989586621680403098 :: TyFun (proxy a) a -> Type

data AsProxyTypeOfSym1 (a6989586621680403098 :: a) :: (~>) (proxy a) a Source #

Instances

Instances details
SingI1 (AsProxyTypeOfSym1 :: a -> TyFun (proxy a) a -> Type) Source # 
Instance details

Defined in Data.Proxy.Singletons

Methods

liftSing :: forall (x :: k1). Sing x -> Sing (AsProxyTypeOfSym1 x)

SingI d => SingI (AsProxyTypeOfSym1 d :: TyFun (proxy a) a -> Type) Source # 
Instance details

Defined in Data.Proxy.Singletons

SuppressUnusedWarnings (AsProxyTypeOfSym1 a6989586621680403098 :: TyFun (proxy a) a -> Type) Source # 
Instance details

Defined in Data.Proxy.Singletons

type Apply (AsProxyTypeOfSym1 a6989586621680403098 :: TyFun (proxy a) a -> Type) (a6989586621680403099 :: proxy a) Source # 
Instance details

Defined in Data.Proxy.Singletons

type Apply (AsProxyTypeOfSym1 a6989586621680403098 :: TyFun (proxy a) a -> Type) (a6989586621680403099 :: proxy a) = AsProxyTypeOf a6989586621680403098 a6989586621680403099

type family AsProxyTypeOfSym2 (a6989586621680403098 :: a) (a6989586621680403099 :: proxy a) :: a where ... Source #

Equations

AsProxyTypeOfSym2 a6989586621680403098 a6989586621680403099 = AsProxyTypeOf a6989586621680403098 a6989586621680403099 

Orphan instances

PAlternative (Proxy :: k -> Type) Source # 
Instance details

Associated Types

type Empty :: f a Source #

type arg <|> arg1 :: f a Source #

PMonadPlus (Proxy :: k -> Type) Source # 
Instance details

Associated Types

type Mzero :: m a Source #

type Mplus arg arg1 :: m a Source #

PApplicative (Proxy :: Type -> Type) Source # 
Instance details

Associated Types

type Pure arg :: f a Source #

type arg <*> arg1 :: f b Source #

type LiftA2 arg arg1 arg2 :: f c Source #

type arg *> arg1 :: f b Source #

type arg <* arg1 :: f a Source #

PFunctor (Proxy :: Type -> Type) Source # 
Instance details

Associated Types

type Fmap arg arg1 :: f b Source #

type arg <$ arg1 :: f a Source #

PMonad (Proxy :: Type -> Type) Source # 
Instance details

Associated Types

type arg >>= arg1 :: m b Source #

type arg >> arg1 :: m b Source #

type Return arg :: m a Source #

SAlternative (Proxy :: Type -> Type) Source # 
Instance details

Methods

sEmpty :: Sing EmptySym0 Source #

(%<|>) :: forall a (t1 :: Proxy a) (t2 :: Proxy a). Sing t1 -> Sing t2 -> Sing (Apply (Apply (<|>@#@$) t1) t2) Source #

SApplicative (Proxy :: Type -> Type) Source # 
Instance details

Methods

sPure :: forall a (t :: a). Sing t -> Sing (Apply PureSym0 t) Source #

(%<*>) :: forall a b (t1 :: Proxy (a ~> b)) (t2 :: Proxy a). Sing t1 -> Sing t2 -> Sing (Apply (Apply (<*>@#@$) t1) t2) Source #

sLiftA2 :: forall a b c (t1 :: a ~> (b ~> c)) (t2 :: Proxy a) (t3 :: Proxy b). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Apply (Apply (Apply LiftA2Sym0 t1) t2) t3) Source #

(%*>) :: forall a b (t1 :: Proxy a) (t2 :: Proxy b). Sing t1 -> Sing t2 -> Sing (Apply (Apply (*>@#@$) t1) t2) Source #

(%<*) :: forall a b (t1 :: Proxy a) (t2 :: Proxy b). Sing t1 -> Sing t2 -> Sing (Apply (Apply (<*@#@$) t1) t2) Source #

SFunctor (Proxy :: Type -> Type) Source # 
Instance details

Methods

sFmap :: forall a b (t1 :: a ~> b) (t2 :: Proxy a). Sing t1 -> Sing t2 -> Sing (Apply (Apply FmapSym0 t1) t2) Source #

(%<$) :: forall a b (t1 :: a) (t2 :: Proxy b). Sing t1 -> Sing t2 -> Sing (Apply (Apply (<$@#@$) t1) t2) Source #

SMonad (Proxy :: Type -> Type) Source # 
Instance details

Methods

(%>>=) :: forall a b (t1 :: Proxy a) (t2 :: a ~> Proxy b). Sing t1 -> Sing t2 -> Sing (Apply (Apply (>>=@#@$) t1) t2) Source #

(%>>) :: forall a b (t1 :: Proxy a) (t2 :: Proxy b). Sing t1 -> Sing t2 -> Sing (Apply (Apply (>>@#@$) t1) t2) Source #

sReturn :: forall a (t :: a). Sing t -> Sing (Apply ReturnSym0 t) Source #

SMonadPlus (Proxy :: Type -> Type) Source # 
Instance details

Methods

sMzero :: Sing MzeroSym0 Source #

sMplus :: forall a (t1 :: Proxy a) (t2 :: Proxy a). Sing t1 -> Sing t2 -> Sing (Apply (Apply MplusSym0 t1) t2) Source #

SingKind (Proxy t) Source # 
Instance details

Associated Types

type Demote (Proxy t) = (r :: Type)

Methods

fromSing :: forall (a :: Proxy t). Sing a -> Demote (Proxy t)

toSing :: Demote (Proxy t) -> SomeSing (Proxy t)

SDecide (Proxy t) Source # 
Instance details

Methods

(%~) :: forall (a :: Proxy t) (b :: Proxy t). Sing a -> Sing b -> Decision (a :~: b) #

PEq (Proxy s) Source # 
Instance details

Associated Types

type arg == arg1 :: Bool Source #

type arg /= arg1 :: Bool Source #

SEq (Proxy s) Source # 
Instance details

Methods

(%==) :: forall (t1 :: Proxy s) (t2 :: Proxy s). Sing t1 -> Sing t2 -> Sing (Apply (Apply (==@#@$) t1) t2) Source #

(%/=) :: forall (t1 :: Proxy s) (t2 :: Proxy s). Sing t1 -> Sing t2 -> Sing (Apply (Apply (/=@#@$) t1) t2) Source #

PMonoid (Proxy s) Source # 
Instance details

Associated Types

type Mempty :: a Source #

type Mappend arg arg1 :: a Source #

type Mconcat arg :: a Source #

SMonoid (Proxy s) Source # 
Instance details

Methods

sMempty :: Sing MemptySym0 Source #

sMappend :: forall (t1 :: Proxy s) (t2 :: Proxy s). Sing t1 -> Sing t2 -> Sing (Apply (Apply MappendSym0 t1) t2) Source #

sMconcat :: forall (t :: [Proxy s]). Sing t -> Sing (Apply MconcatSym0 t) Source #

POrd (Proxy s) Source # 
Instance details

Associated Types

type Compare arg arg1 :: Ordering Source #

type arg < arg1 :: Bool Source #

type arg <= arg1 :: Bool Source #

type arg > arg1 :: Bool Source #

type arg >= arg1 :: Bool Source #

type Max arg arg1 :: a Source #

type Min arg arg1 :: a Source #

SOrd (Proxy s) Source # 
Instance details

Methods

sCompare :: forall (t1 :: Proxy s) (t2 :: Proxy s). Sing t1 -> Sing t2 -> Sing (Apply (Apply CompareSym0 t1) t2) Source #

(%<) :: forall (t1 :: Proxy s) (t2 :: Proxy s). Sing t1 -> Sing t2 -> Sing (Apply (Apply (<@#@$) t1) t2) Source #

(%<=) :: forall (t1 :: Proxy s) (t2 :: Proxy s). Sing t1 -> Sing t2 -> Sing (Apply (Apply (<=@#@$) t1) t2) Source #

(%>) :: forall (t1 :: Proxy s) (t2 :: Proxy s). Sing t1 -> Sing t2 -> Sing (Apply (Apply (>@#@$) t1) t2) Source #

(%>=) :: forall (t1 :: Proxy s) (t2 :: Proxy s). Sing t1 -> Sing t2 -> Sing (Apply (Apply (>=@#@$) t1) t2) Source #

sMax :: forall (t1 :: Proxy s) (t2 :: Proxy s). Sing t1 -> Sing t2 -> Sing (Apply (Apply MaxSym0 t1) t2) Source #

sMin :: forall (t1 :: Proxy s) (t2 :: Proxy s). Sing t1 -> Sing t2 -> Sing (Apply (Apply MinSym0 t1) t2) Source #

PSemigroup (Proxy s) Source # 
Instance details

Associated Types

type arg <> arg1 :: a Source #

type Sconcat arg :: a Source #

SSemigroup (Proxy s) Source # 
Instance details

Methods

(%<>) :: forall (t1 :: Proxy s) (t2 :: Proxy s). Sing t1 -> Sing t2 -> Sing (Apply (Apply (<>@#@$) t1) t2) Source #

sSconcat :: forall (t :: NonEmpty (Proxy s)). Sing t -> Sing (Apply SconcatSym0 t) Source #

PBounded (Proxy s) Source # 
Instance details

Associated Types

type MinBound :: a Source #

type MaxBound :: a Source #

PEnum (Proxy s) Source # 
Instance details

Associated Types

type Succ arg :: a Source #

type Pred arg :: a Source #

type ToEnum arg :: a Source #

type FromEnum arg :: Natural Source #

type EnumFromTo arg arg1 :: [a] Source #

type EnumFromThenTo arg arg1 arg2 :: [a] Source #

SBounded (Proxy s) Source # 
Instance details

SEnum (Proxy s) Source # 
Instance details

Methods

sSucc :: forall (t :: Proxy s). Sing t -> Sing (Apply SuccSym0 t) Source #

sPred :: forall (t :: Proxy s). Sing t -> Sing (Apply PredSym0 t) Source #

sToEnum :: forall (t :: Natural). Sing t -> Sing (Apply ToEnumSym0 t) Source #

sFromEnum :: forall (t :: Proxy s). Sing t -> Sing (Apply FromEnumSym0 t) Source #

sEnumFromTo :: forall (t1 :: Proxy s) (t2 :: Proxy s). Sing t1 -> Sing t2 -> Sing (Apply (Apply EnumFromToSym0 t1) t2) Source #

sEnumFromThenTo :: forall (t1 :: Proxy s) (t2 :: Proxy s) (t3 :: Proxy s). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Apply (Apply (Apply EnumFromThenToSym0 t1) t2) t3) Source #

PShow (Proxy s) Source # 
Instance details

Associated Types

type ShowsPrec arg arg1 arg2 :: Symbol Source #

type Show_ arg :: Symbol Source #

type ShowList arg arg1 :: Symbol Source #

SShow (Proxy s) Source # 
Instance details

Methods

sShowsPrec :: forall (t1 :: Natural) (t2 :: Proxy s) (t3 :: Symbol). Sing t1 -> Sing t2 -> Sing t3 -> Sing (Apply (Apply (Apply ShowsPrecSym0 t1) t2) t3) Source #

sShow_ :: forall (t :: Proxy s). Sing t -> Sing (Apply Show_Sym0 t) Source #

sShowList :: forall (t1 :: [Proxy s]) (t2 :: Symbol). Sing t1 -> Sing t2 -> Sing (Apply (Apply ShowListSym0 t1) t2) Source #

SingI ('Proxy :: Proxy t) Source # 
Instance details

Methods

sing :: Sing 'Proxy