singletons-base-3.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
LanguageHaskell2010

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_6989586621680394732 a_6989586621680394734 = Apply (Apply ConstSym0 a_6989586621680394732) a_6989586621680394734 

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) (a6989586621680394739 :: a) Source # 
Instance details

Defined in Data.Proxy.Singletons

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

data AsProxyTypeOfSym1 (a6989586621680394739 :: 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 a6989586621680394739 :: TyFun (proxy a) a -> Type) Source # 
Instance details

Defined in Data.Proxy.Singletons

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

Defined in Data.Proxy.Singletons

type Apply (AsProxyTypeOfSym1 a6989586621680394739 :: TyFun (proxy a) a -> Type) (a6989586621680394740 :: proxy a) = AsProxyTypeOf a6989586621680394739 a6989586621680394740

type family AsProxyTypeOfSym2 (a6989586621680394739 :: a) (a6989586621680394740 :: proxy a) :: a where ... Source #

Equations

AsProxyTypeOfSym2 a6989586621680394739 a6989586621680394740 = AsProxyTypeOf a6989586621680394739 a6989586621680394740 

Orphan instances

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

Associated Types

type Empty :: f a Source #

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

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

Associated Types

type Mzero :: m a Source #

type Mplus arg arg :: m a Source #

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

Associated Types

type Pure arg :: f a Source #

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

type LiftA2 arg arg arg :: f c Source #

type arg *> arg :: f b Source #

type arg <* arg :: f a Source #

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

Associated Types

type Fmap arg arg :: f b Source #

type arg <$ arg :: f a Source #

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

Associated Types

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

type arg >> arg :: m b Source #

type Return arg :: m a Source #

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

Methods

sEmpty :: Sing EmptySym0 Source #

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

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

Methods

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

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

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

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

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

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

Methods

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

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

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

Methods

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

(%>>) :: forall a b (t :: Proxy a) (t :: Proxy b). Sing t -> Sing t -> Sing (Apply (Apply (>>@#@$) t) t) 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 (t :: Proxy a) (t :: Proxy a). Sing t -> Sing t -> Sing (Apply (Apply MplusSym0 t) t) 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 == arg :: Bool Source #

type arg /= arg :: Bool Source #

SEq (Proxy s) Source # 
Instance details

Methods

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

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

PMonoid (Proxy s) Source # 
Instance details

Associated Types

type Mempty :: a Source #

type Mappend arg arg :: a Source #

type Mconcat arg :: a Source #

SMonoid (Proxy s) Source # 
Instance details

Methods

sMempty :: Sing MemptySym0 Source #

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

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

POrd (Proxy s) Source # 
Instance details

Associated Types

type Compare arg arg :: Ordering Source #

type arg < arg :: Bool Source #

type arg <= arg :: Bool Source #

type arg > arg :: Bool Source #

type arg >= arg :: Bool Source #

type Max arg arg :: a Source #

type Min arg arg :: a Source #

SOrd (Proxy s) Source # 
Instance details

Methods

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

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

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

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

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

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

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

PSemigroup (Proxy s) Source # 
Instance details

Associated Types

type arg <> arg :: a Source #

type Sconcat arg :: a Source #

SSemigroup (Proxy s) Source # 
Instance details

Methods

(%<>) :: forall (t :: Proxy s) (t :: Proxy s). Sing t -> Sing t -> Sing (Apply (Apply (<>@#@$) t) t) 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 arg :: [a] Source #

type EnumFromThenTo arg arg arg :: [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 (t :: Proxy s) (t :: Proxy s). Sing t -> Sing t -> Sing (Apply (Apply EnumFromToSym0 t) t) Source #

sEnumFromThenTo :: forall (t :: Proxy s) (t :: Proxy s) (t :: Proxy s). Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply EnumFromThenToSym0 t) t) t) Source #

PShow (Proxy s) Source # 
Instance details

Associated Types

type ShowsPrec arg arg arg :: Symbol Source #

type Show_ arg :: Symbol Source #

type ShowList arg arg :: Symbol Source #

SShow (Proxy s) Source # 
Instance details

Methods

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

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

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

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

Methods

sing :: Sing 'Proxy0