Copyright | (C) 2013 Richard Eisenberg |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Ryan Scott |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | GHC2021 |
This module defines singleton instances making TypeRep
the singleton for
the kind
(for some TYPE
repRuntimeRep
rep
), an instantiation of
which is the famous kind Type
. The definitions don't fully line up with
what is expected within the singletons library, so expect unusual results!
Synopsis
- type family Sing :: k -> Type
- data SomeTypeRepTYPE (a :: RuntimeRep) where
- SomeTypeRepTYPE :: forall (a :: RuntimeRep) (a1 :: TYPE a). !(TypeRep a1) -> SomeTypeRepTYPE a
Documentation
type family Sing :: k -> Type #
Instances
Here is the definition of the singleton for
:TYPE
rep
type instance Sing \@(TYPE rep) = TypeRep
Instances for SingI
, SingKind
, SEq
, SDecide
, and
TestCoercion
are also supplied.
data SomeTypeRepTYPE (a :: RuntimeRep) where Source #
A variant of SomeTypeRep
whose underlying TypeRep
is restricted to
kind
(for some TYPE
repRuntimeRep
rep
).
SomeTypeRepTYPE :: forall (a :: RuntimeRep) (a1 :: TYPE a). !(TypeRep a1) -> SomeTypeRepTYPE a |
Instances
Show (SomeTypeRepTYPE rep) Source # | |
Defined in Data.Singletons.Base.TypeRepTYPE showsPrec :: Int -> SomeTypeRepTYPE rep -> ShowS # show :: SomeTypeRepTYPE rep -> String # showList :: [SomeTypeRepTYPE rep] -> ShowS # | |
Eq (SomeTypeRepTYPE rep) Source # | |
Defined in Data.Singletons.Base.TypeRepTYPE (==) :: SomeTypeRepTYPE rep -> SomeTypeRepTYPE rep -> Bool # (/=) :: SomeTypeRepTYPE rep -> SomeTypeRepTYPE rep -> Bool # | |
Ord (SomeTypeRepTYPE rep) Source # | |
Defined in Data.Singletons.Base.TypeRepTYPE compare :: SomeTypeRepTYPE rep -> SomeTypeRepTYPE rep -> Ordering # (<) :: SomeTypeRepTYPE rep -> SomeTypeRepTYPE rep -> Bool # (<=) :: SomeTypeRepTYPE rep -> SomeTypeRepTYPE rep -> Bool # (>) :: SomeTypeRepTYPE rep -> SomeTypeRepTYPE rep -> Bool # (>=) :: SomeTypeRepTYPE rep -> SomeTypeRepTYPE rep -> Bool # max :: SomeTypeRepTYPE rep -> SomeTypeRepTYPE rep -> SomeTypeRepTYPE rep # min :: SomeTypeRepTYPE rep -> SomeTypeRepTYPE rep -> SomeTypeRepTYPE rep # |
Orphan instances
SingKind (TYPE rep) Source # | |
SDecide (TYPE rep) Source # | |
PEq (TYPE rep) Source # | |
SEq (TYPE rep) Source # | |
(%==) :: forall (t1 :: TYPE rep) (t2 :: TYPE rep). Sing t1 -> Sing t2 -> Sing (Apply (Apply ((==@#@$) :: TyFun (TYPE rep) (TYPE rep ~> Bool) -> Type) t1) t2) Source # (%/=) :: forall (t1 :: TYPE rep) (t2 :: TYPE rep). Sing t1 -> Sing t2 -> Sing (Apply (Apply ((/=@#@$) :: TyFun (TYPE rep) (TYPE rep ~> Bool) -> Type) t1) t2) Source # | |
Typeable a => SingI (a :: TYPE rep) Source # | |