singletons-2.7: A framework for generating singleton types
Copyright(C) 2020 Ryan Scott
LicenseBSD-style (see LICENSE)
MaintainerRichard Eisenberg (rae@cs.brynmawr.edu)
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Data.Singletons.Prelude.Proxy

Description

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

Synopsis

The Proxy singleton

type family Sing Source #

The singleton kind-indexed type family.

Instances

Instances details
type Sing Source # 
Instance details

Defined in Data.Singletons.Prelude.Instances

type Sing = SBool
type Sing Source # 
Instance details

Defined in Data.Singletons.Prelude.Instances

type Sing Source # 
Instance details

Defined in Data.Singletons.TypeLits.Internal

type Sing = SNat
type Sing Source # 
Instance details

Defined in Data.Singletons.TypeLits.Internal

type Sing = SSymbol
type Sing Source # 
Instance details

Defined in Data.Singletons.Prelude.Instances

type Sing = STuple0
type Sing Source # 
Instance details

Defined in Data.Singletons.Prelude.Instances

type Sing = SVoid
type Sing Source # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

type Sing = SAll
type Sing Source # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

type Sing = SAny
type Sing Source # 
Instance details

Defined in Data.Singletons.TypeError

type Sing Source # 
Instance details

Defined in Data.Singletons.Prelude.Instances

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

Defined in Data.Singletons.Prelude.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.TypeRepTYPE

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

Defined in Data.Singletons.Prelude.Semigroup.Internal

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

Defined in Data.Singletons.Prelude.Semigroup.Internal

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

Defined in Data.Singletons.Prelude.Semigroup.Internal

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

Defined in Data.Singletons.Prelude.Semigroup.Internal

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

Defined in Data.Singletons.Prelude.Semigroup.Internal

type Sing Source # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

type Sing = SOption :: Option a -> Type
type Sing Source # 
Instance details

Defined in Data.Singletons.Prelude.Instances

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

Defined in Data.Singletons.Prelude.Monoid

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

Defined in Data.Singletons.Prelude.Monoid

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

Defined in Data.Singletons.Prelude.Semigroup.Internal

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

Defined in Data.Singletons.Prelude.Semigroup.Internal

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

Defined in Data.Singletons.Prelude.Semigroup.Internal

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

Defined in Data.Singletons.Prelude.Ord

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

Defined in Data.Singletons.Prelude.Instances

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

Defined in Data.Singletons.Prelude.Instances

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

Defined in Data.Singletons.Prelude.Instances

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

Defined in Data.Singletons.Prelude.Semigroup

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

Defined in Data.Singletons.Prelude.Proxy

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

Defined in Data.Singletons.Internal

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

Defined in Data.Singletons.Internal

type Sing Source # 
Instance details

Defined in Data.Singletons.Sigma

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

Defined in Data.Singletons.Prelude.Instances

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

Defined in Data.Singletons.Prelude.Const

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

Defined in Data.Singletons.Prelude.Instances

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

Defined in Data.Singletons.Prelude.Instances

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

Defined in Data.Singletons.Prelude.Instances

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

Defined in Data.Singletons.Prelude.Instances

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

data SProxy :: forall t. 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.Singletons.Prelude.Proxy

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.Singletons.Prelude.Proxy

Methods

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

Show (SProxy z) Source # 
Instance details

Defined in Data.Singletons.Prelude.Proxy

Methods

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

show :: SProxy z -> String #

showList :: [SProxy z] -> ShowS #

type family AsProxyTypeOf a a where ... Source #

Equations

AsProxyTypeOf a_6989586621680453158 a_6989586621680453160 = Apply (Apply ConstSym0 a_6989586621680453158) a_6989586621680453160 

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

Defunctionalization symbols

type ProxySym0 = 'Proxy :: Proxy (t :: k) Source #

data AsProxyTypeOfSym0 a6989586621680453165 Source #

Instances

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

Defined in Data.Singletons.Prelude.Proxy

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

Defined in Data.Singletons.Prelude.Proxy

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

Defined in Data.Singletons.Prelude.Proxy

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

data AsProxyTypeOfSym1 a6989586621680453165 a6989586621680453166 Source #

Instances

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

Defined in Data.Singletons.Prelude.Proxy

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

Defined in Data.Singletons.Prelude.Proxy

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

Defined in Data.Singletons.Prelude.Proxy

type Apply (AsProxyTypeOfSym1 a6989586621680453165 :: TyFun (proxy a) a -> Type) (a6989586621680453166 :: proxy a) = AsProxyTypeOfSym2 a6989586621680453165 a6989586621680453166

type AsProxyTypeOfSym2 (a6989586621680453165 :: a) (a6989586621680453166 :: proxy a) = AsProxyTypeOf a6989586621680453165 a6989586621680453166 :: a Source #

Orphan instances

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

Associated Types

type Mzero :: m a Source #

type Mplus arg arg :: m a Source #

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

Associated Types

type Empty :: f a Source #

type arg <|> arg :: f a 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 #

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 #

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 #

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 #

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 #

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 #

SingKind (Proxy t) Source # 
Instance details

Associated Types

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

Methods

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

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

SDecide (Proxy t) Source # 
Instance details

Methods

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

PEq (Proxy s) Source # 
Instance details

Associated Types

type x == y :: Bool Source #

type x /= y :: Bool Source #

SEq (Proxy s) Source # 
Instance details

Methods

(%==) :: forall (a :: Proxy s) (b :: Proxy s). Sing a -> Sing b -> Sing (a == b) Source #

(%/=) :: forall (a :: Proxy s) (b :: Proxy s). Sing a -> Sing b -> Sing (a /= b) 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 #

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 #

SBounded (Proxy s) Source # 
Instance details

PBounded (Proxy s) Source # 
Instance details

Associated Types

type MinBound :: a Source #

type MaxBound :: a Source #

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 :: Nat). 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 #

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 :: Nat Source #

type EnumFromTo arg arg :: [a] Source #

type EnumFromThenTo arg arg 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 #

PSemigroup (Proxy s) Source # 
Instance details

Associated Types

type arg <> arg :: a Source #

type Sconcat arg :: a Source #

SShow (Proxy s) Source # 
Instance details

Methods

sShowsPrec :: forall (t :: Nat) (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 #

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 #

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 #

PMonoid (Proxy s) Source # 
Instance details

Associated Types

type Mempty :: a Source #

type Mappend arg arg :: a Source #

type Mconcat arg :: a Source #

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

Methods

sing :: Sing 'Proxy0 Source #