Copyright | (C) 2013 Richard Eisenberg |
---|---|
License | BSD-style (see LICENSE) |
Maintainer | Richard Eisenberg (rae@cs.brynmawr.edu) |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
This module defines singleton instances making TypeRep
the singleton for
the kind *
. The definitions don't fully line up with what is expected
within the singletons library, so expect unusual results!
Synopsis
- data family Sing (a :: k)
- data SomeTypeRepStar where
- SomeTypeRepStar :: forall (a :: *). !(TypeRep a) -> SomeTypeRepStar
Documentation
data family Sing (a :: k) Source #
The singleton kind-indexed data family.
Instances
data Sing (z :: Bool) Source # | |
data Sing (z :: Ordering) Source # | |
data Sing (a :: Type) Source # | |
data Sing (n :: Nat) Source # | |
data Sing (n :: Symbol) Source # | |
data Sing (z :: ()) Source # | |
data Sing (z :: Void) Source # | |
data Sing (z :: [a]) Source # | |
data Sing (z :: Maybe a) Source # | |
data Sing (z :: NonEmpty a) Source # | |
data Sing (z :: Either a b) Source # | |
data Sing (z :: (a, b)) Source # | |
data Sing (f :: k1 ~> k2) Source # | |
data Sing (z :: (a, b, c)) Source # | |
data Sing (z :: (a, b, c, d)) Source # | |
data Sing (z :: (a, b, c, d, e)) Source # | |
data Sing (z :: (a, b, c, d, e, f)) Source # | |
data Sing (z :: (a, b, c, d, e, f, g)) Source # | |
Here is the definition of the singleton for *
:
newtype instance Sing :: Type -> Type where STypeRep :: TypeRep a -> Sing a
Instances for SingI
, SingKind
, SEq
, SDecide
, and TestCoercion
are
also supplied.
data SomeTypeRepStar where Source #
A variant of SomeTypeRep
whose underlying TypeRep
is restricted to
kind *
.
SomeTypeRepStar :: forall (a :: *). !(TypeRep a) -> SomeTypeRepStar |
Instances
Eq SomeTypeRepStar Source # | |
(==) :: SomeTypeRepStar -> SomeTypeRepStar -> Bool # (/=) :: SomeTypeRepStar -> SomeTypeRepStar -> Bool # | |
Ord SomeTypeRepStar Source # | |
compare :: SomeTypeRepStar -> SomeTypeRepStar -> Ordering # (<) :: SomeTypeRepStar -> SomeTypeRepStar -> Bool # (<=) :: SomeTypeRepStar -> SomeTypeRepStar -> Bool # (>) :: SomeTypeRepStar -> SomeTypeRepStar -> Bool # (>=) :: SomeTypeRepStar -> SomeTypeRepStar -> Bool # max :: SomeTypeRepStar -> SomeTypeRepStar -> SomeTypeRepStar # min :: SomeTypeRepStar -> SomeTypeRepStar -> SomeTypeRepStar # | |
Show SomeTypeRepStar Source # | |
showsPrec :: Int -> SomeTypeRepStar -> ShowS # show :: SomeTypeRepStar -> String # showList :: [SomeTypeRepStar] -> ShowS # |