singletons-2.5.1: A framework for generating singleton types

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

Data.Singletons.Prelude.Identity

Contents

Description

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

Synopsis

The Identity singleton

data family Sing :: k -> Type #

The singleton kind-indexed data family.

Instances
SDecide k => TestCoercion (Sing :: k -> Type) # 
Instance details

Defined in Data.Singletons.Decide

Methods

testCoercion :: Sing a -> Sing b -> Maybe (Coercion a b) #

SDecide k => TestEquality (Sing :: k -> Type) # 
Instance details

Defined in Data.Singletons.Decide

Methods

testEquality :: Sing a -> Sing b -> Maybe (a :~: b) #

Show (SSymbol s) # 
Instance details

Defined in Data.Singletons.ShowSing

Methods

showsPrec :: Int -> SSymbol s -> ShowS #

show :: SSymbol s -> String #

showList :: [SSymbol s] -> ShowS #

Show (SNat n) # 
Instance details

Defined in Data.Singletons.ShowSing

Methods

showsPrec :: Int -> SNat n -> ShowS #

show :: SNat n -> String #

showList :: [SNat n] -> ShowS #

Eq (Sing a) # 
Instance details

Defined in Data.Singletons.TypeRepTYPE

Methods

(==) :: Sing a -> Sing a -> Bool #

(/=) :: Sing a -> Sing a -> Bool #

Ord (Sing a) # 
Instance details

Defined in Data.Singletons.TypeRepTYPE

Methods

compare :: Sing a -> Sing a -> Ordering #

(<) :: Sing a -> Sing a -> Bool #

(<=) :: Sing a -> Sing a -> Bool #

(>) :: Sing a -> Sing a -> Bool #

(>=) :: Sing a -> Sing a -> Bool #

max :: Sing a -> Sing a -> Sing a #

min :: Sing a -> Sing a -> Sing a #

Show (Sing z) # 
Instance details

Defined in Data.Singletons.ShowSing

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

(ShowSing a, ShowSing [a]) => Show (Sing z) # 
Instance details

Defined in Data.Singletons.ShowSing

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

ShowSing a => Show (Sing z) # 
Instance details

Defined in Data.Singletons.ShowSing

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

Show (Sing z) # 
Instance details

Defined in Data.Singletons.ShowSing

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

(ShowSing a, ShowSing b) => Show (Sing z) # 
Instance details

Defined in Data.Singletons.ShowSing

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

Show (Sing a) # 
Instance details

Defined in Data.Singletons.TypeRepTYPE

Methods

showsPrec :: Int -> Sing a -> ShowS #

show :: Sing a -> String #

showList :: [Sing a] -> ShowS #

Show (Sing z) # 
Instance details

Defined in Data.Singletons.ShowSing

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

(ShowSing a, ShowSing b) => Show (Sing z) # 
Instance details

Defined in Data.Singletons.ShowSing

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

(ShowSing a, ShowSing b, ShowSing c) => Show (Sing z) # 
Instance details

Defined in Data.Singletons.ShowSing

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

(ShowSing a, ShowSing b, ShowSing c, ShowSing d) => Show (Sing z) # 
Instance details

Defined in Data.Singletons.ShowSing

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

(ShowSing a, ShowSing b, ShowSing c, ShowSing d, ShowSing e) => Show (Sing z) # 
Instance details

Defined in Data.Singletons.ShowSing

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

(ShowSing a, ShowSing b, ShowSing c, ShowSing d, ShowSing e, ShowSing f) => Show (Sing z) # 
Instance details

Defined in Data.Singletons.ShowSing

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

(ShowSing a, ShowSing b, ShowSing c, ShowSing d, ShowSing e, ShowSing f, ShowSing g) => Show (Sing z) # 
Instance details

Defined in Data.Singletons.ShowSing

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

Show (Sing z) # 
Instance details

Defined in Data.Singletons.ShowSing

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

ShowSing a => Show (Sing z) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

ShowSing a => Show (Sing z) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

(ShowSing a, ShowSing b) => Show (Sing z) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

ShowSing a => Show (Sing z) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

ShowSing a => Show (Sing z) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

ShowSing m => Show (Sing z) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

ShowSing (Maybe a) => Show (Sing z) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

ShowSing a => Show (Sing z) # 
Instance details

Defined in Data.Singletons.ShowSing

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

ShowSing (Maybe a) => Show (Sing z) # 
Instance details

Defined in Data.Singletons.Prelude.Monoid

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

ShowSing (Maybe a) => Show (Sing z) # 
Instance details

Defined in Data.Singletons.Prelude.Monoid

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

ShowSing a => Show (Sing z) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

ShowSing Bool => Show (Sing z) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

ShowSing Bool => Show (Sing z) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

ShowSing a => Show (Sing z) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

ShowSing a => Show (Sing z) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

(ShowSing a, ShowSing [a]) => Show (Sing z) # 
Instance details

Defined in Data.Singletons.ShowSing

Methods

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

show :: Sing z -> String #

showList :: [Sing z] -> ShowS #

data Sing (a :: Bool) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (a :: Bool) where
data Sing (a :: Ordering) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (a :: Ordering) where
data Sing (n :: Nat) # 
Instance details

Defined in Data.Singletons.TypeLits.Internal

data Sing (n :: Nat) where
data Sing (n :: Symbol) # 
Instance details

Defined in Data.Singletons.TypeLits.Internal

data Sing (n :: Symbol) where
data Sing (a :: ()) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (a :: ()) where
data Sing (a :: Void) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (a :: Void)
data Sing (a :: All) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (a :: All) where
data Sing (a :: Any) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (a :: Any) where
data Sing (a :: PErrorMessage) # 
Instance details

Defined in Data.Singletons.TypeError

data Sing (a :: PErrorMessage) where
data Sing (b :: [a]) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (b :: [a]) where
  • SNil :: forall k (b :: [k]). Sing ([] :: [k])
  • SCons :: forall a (b :: [a]) (n :: a) (n :: [a]). Sing n -> Sing n -> Sing (n ': n)
data Sing (b :: Maybe a) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (b :: Maybe a) where
newtype Sing (a :: TYPE rep) #

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 -> Type` 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

newtype Sing (a :: TYPE rep) = STypeRep (TypeRep a)
data Sing (b :: Min a) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (b :: Min a) where
data Sing (b :: Max a) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (b :: Max a) where
data Sing (b :: First a) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (b :: First a) where
data Sing (b :: Last a) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (b :: Last a) where
data Sing (a :: WrappedMonoid m) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (a :: WrappedMonoid m) where
data Sing (b :: Option a) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (b :: Option a) where
data Sing (b :: Identity a) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (b :: Identity a) where
data Sing (b :: First a) # 
Instance details

Defined in Data.Singletons.Prelude.Monoid

data Sing (b :: First a) where
data Sing (b :: Last a) # 
Instance details

Defined in Data.Singletons.Prelude.Monoid

data Sing (b :: Last a) where
data Sing (b :: Dual a) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (b :: Dual a) where
data Sing (b :: Sum a) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (b :: Sum a) where
data Sing (b :: Product a) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup.Internal

data Sing (b :: Product a) where
data Sing (b :: Down a) # 
Instance details

Defined in Data.Singletons.Prelude.Ord

data Sing (b :: Down a) where
data Sing (b :: NonEmpty a) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (b :: NonEmpty a) where
data Sing (c :: Either a b) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (c :: Either a b) where
data Sing (c :: (a, b)) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (c :: (a, b)) where
data Sing (c :: Arg a b) # 
Instance details

Defined in Data.Singletons.Prelude.Semigroup

data Sing (c :: Arg a b) where
newtype Sing (f :: k1 ~> k2) # 
Instance details

Defined in Data.Singletons.Internal

newtype Sing (f :: k1 ~> k2) = SLambda {}
data Sing (d :: (a, b, c)) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (d :: (a, b, c)) where
data Sing (c :: Const a b) # 
Instance details

Defined in Data.Singletons.Prelude.Const

data Sing (c :: Const a b) where
data Sing (e :: (a, b, c, d)) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (e :: (a, b, c, d)) where
data Sing (f :: (a, b, c, d, e)) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (f :: (a, b, c, d, e)) where
data Sing (g :: (a, b, c, d, e, f)) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (g :: (a, b, c, d, e, f)) where
data Sing (h :: (a, b, c, d, e, f, g)) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

data Sing (h :: (a, b, c, d, e, f, g)) where

type SIdentity = (Sing :: Identity a -> Type) #

type family RunIdentity (a :: Identity a) :: a where ... #

Equations

RunIdentity (Identity field) = field 

Defunctionalization symbols

data IdentitySym0 :: forall (a6989586621679087254 :: Type). (~>) a6989586621679087254 (Identity (a6989586621679087254 :: Type)) #

Instances
SingI (IdentitySym0 :: TyFun a (Identity a) -> Type) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

SuppressUnusedWarnings (IdentitySym0 :: TyFun a6989586621679087254 (Identity a6989586621679087254) -> Type) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

type Apply (IdentitySym0 :: TyFun a (Identity a) -> Type) (t6989586621679312928 :: a) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

type Apply (IdentitySym0 :: TyFun a (Identity a) -> Type) (t6989586621679312928 :: a) = Identity t6989586621679312928

type IdentitySym1 (t6989586621679312928 :: a6989586621679087254) = Identity t6989586621679312928 #

data RunIdentitySym0 :: forall a6989586621679087254. (~>) (Identity a6989586621679087254) a6989586621679087254 #

Instances
SuppressUnusedWarnings (RunIdentitySym0 :: TyFun (Identity a6989586621679087254) a6989586621679087254 -> Type) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

type Apply (RunIdentitySym0 :: TyFun (Identity a) a -> Type) (a6989586621679312925 :: Identity a) # 
Instance details

Defined in Data.Singletons.Prelude.Instances

type Apply (RunIdentitySym0 :: TyFun (Identity a) a -> Type) (a6989586621679312925 :: Identity a) = RunIdentity a6989586621679312925

type RunIdentitySym1 (a6989586621679312925 :: Identity a6989586621679087254) = RunIdentity a6989586621679312925 #

Orphan instances

SMonad Identity # 
Instance details

Methods

(%>>=) :: Sing t -> Sing t -> Sing (Apply (Apply (>>=@#@$) t) t) #

(%>>) :: Sing t -> Sing t -> Sing (Apply (Apply (>>@#@$) t) t) #

sReturn :: Sing t -> Sing (Apply ReturnSym0 t) #

sFail :: Sing t -> Sing (Apply FailSym0 t) #

SApplicative Identity # 
Instance details

Methods

sPure :: Sing t -> Sing (Apply PureSym0 t) #

(%<*>) :: Sing t -> Sing t -> Sing (Apply (Apply (<*>@#@$) t) t) #

sLiftA2 :: Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply LiftA2Sym0 t) t) t) #

(%*>) :: Sing t -> Sing t -> Sing (Apply (Apply (*>@#@$) t) t) #

(%<*) :: Sing t -> Sing t -> Sing (Apply (Apply (<*@#@$) t) t) #

SFunctor Identity # 
Instance details

Methods

sFmap :: Sing t -> Sing t -> Sing (Apply (Apply FmapSym0 t) t) #

(%<$) :: Sing t -> Sing t -> Sing (Apply (Apply (<$@#@$) t) t) #

PMonad Identity # 
Instance details

Associated Types

type arg >>= arg :: m b #

type arg >> arg :: m b #

type Return arg :: m a #

type Fail arg :: m a #

PApplicative Identity # 
Instance details

Associated Types

type Pure arg :: f a #

type arg <*> arg :: f b #

type LiftA2 arg arg arg :: f c #

type arg *> arg :: f b #

type arg <* arg :: f a #

PFunctor Identity # 
Instance details

Associated Types

type Fmap arg arg :: f b #

type arg <$ arg :: f a #

SFoldable Identity # 
Instance details

Methods

sFold :: SMonoid m => Sing t -> Sing (Apply FoldSym0 t) #

sFoldMap :: SMonoid m => Sing t -> Sing t -> Sing (Apply (Apply FoldMapSym0 t) t) #

sFoldr :: Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply FoldrSym0 t) t) t) #

sFoldr' :: Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply Foldr'Sym0 t) t) t) #

sFoldl :: Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply FoldlSym0 t) t) t) #

sFoldl' :: Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply Foldl'Sym0 t) t) t) #

sFoldr1 :: Sing t -> Sing t -> Sing (Apply (Apply Foldr1Sym0 t) t) #

sFoldl1 :: Sing t -> Sing t -> Sing (Apply (Apply Foldl1Sym0 t) t) #

sToList :: Sing t -> Sing (Apply ToListSym0 t) #

sNull :: Sing t -> Sing (Apply NullSym0 t) #

sLength :: Sing t -> Sing (Apply LengthSym0 t) #

sElem :: SEq a => Sing t -> Sing t -> Sing (Apply (Apply ElemSym0 t) t) #

sMaximum :: SOrd a => Sing t -> Sing (Apply MaximumSym0 t) #

sMinimum :: SOrd a => Sing t -> Sing (Apply MinimumSym0 t) #

sSum :: SNum a => Sing t -> Sing (Apply SumSym0 t) #

sProduct :: SNum a => Sing t -> Sing (Apply ProductSym0 t) #

PFoldable Identity # 
Instance details

Associated Types

type Fold arg :: m #

type FoldMap arg arg :: m #

type Foldr arg arg arg :: b #

type Foldr' arg arg arg :: b #

type Foldl arg arg arg :: b #

type Foldl' arg arg arg :: b #

type Foldr1 arg arg :: a #

type Foldl1 arg arg :: a #

type ToList arg :: [a] #

type Null arg :: Bool #

type Length arg :: Nat #

type Elem arg arg :: Bool #

type Maximum arg :: a #

type Minimum arg :: a #

type Sum arg :: a #

type Product arg :: a #

SNum a => SNum (Identity a) # 
Instance details

Methods

(%+) :: Sing t -> Sing t -> Sing (Apply (Apply (+@#@$) t) t) #

(%-) :: Sing t -> Sing t -> Sing (Apply (Apply (-@#@$) t) t) #

(%*) :: Sing t -> Sing t -> Sing (Apply (Apply (*@#@$) t) t) #

sNegate :: Sing t -> Sing (Apply NegateSym0 t) #

sAbs :: Sing t -> Sing (Apply AbsSym0 t) #

sSignum :: Sing t -> Sing (Apply SignumSym0 t) #

sFromInteger :: Sing t -> Sing (Apply FromIntegerSym0 t) #

PNum (Identity a) # 
Instance details

Associated Types

type arg + arg :: a #

type arg - arg :: a #

type arg * arg :: a #

type Negate arg :: a #

type Abs arg :: a #

type Signum arg :: a #

type FromInteger arg :: a #

SEnum a => SEnum (Identity a) # 
Instance details

PEnum (Identity a) # 
Instance details

Associated Types

type Succ arg :: a #

type Pred arg :: a #

type ToEnum arg :: a #

type FromEnum arg :: Nat #

type EnumFromTo arg arg :: [a] #

type EnumFromThenTo arg arg arg :: [a] #

SSemigroup a => SSemigroup (Identity a) # 
Instance details

Methods

(%<>) :: Sing t -> Sing t -> Sing (Apply (Apply (<>@#@$) t) t) #

sSconcat :: Sing t -> Sing (Apply SconcatSym0 t) #

PSemigroup (Identity a) # 
Instance details

Associated Types

type arg <> arg :: a #

type Sconcat arg :: a #

SShow a => SShow (Identity a) # 
Instance details

Methods

sShowsPrec :: Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply ShowsPrecSym0 t) t) t) #

sShow_ :: Sing t -> Sing (Apply Show_Sym0 t) #

sShowList :: Sing t -> Sing t -> Sing (Apply (Apply ShowListSym0 t) t) #

PShow (Identity a) # 
Instance details

Associated Types

type ShowsPrec arg arg arg :: Symbol #

type Show_ arg :: Symbol #

type ShowList arg arg :: Symbol #

SMonoid a => SMonoid (Identity a) # 
Instance details

PMonoid (Identity a) # 
Instance details

Associated Types

type Mempty :: a #

type Mappend arg arg :: a #

type Mconcat arg :: a #