Copyright | (C) 2013 Richard Eisenberg |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Ryan Scott |
Stability | experimental |
Portability | non-portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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 :: RuntimeRep -> Type where
- SomeTypeRepTYPE :: forall (rep :: RuntimeRep) (a :: TYPE rep). !(TypeRep a) -> SomeTypeRepTYPE rep
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 :: RuntimeRep -> Type where Source #
A variant of SomeTypeRep
whose underlying TypeRep
is restricted to
kind
(for some TYPE
repRuntimeRep
rep
).
SomeTypeRepTYPE :: forall (rep :: RuntimeRep) (a :: TYPE rep). !(TypeRep a) -> SomeTypeRepTYPE rep |
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 # |