singletons-2.4: A framework for generating singleton types

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

Data.Singletons.TypeRepStar

Contents

Description

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

Documentation

data family Sing (a :: k) Source #

The singleton kind-indexed data family.

Instances
data Sing (z :: Bool) Source # 
Instance details
data Sing (z :: Bool) where
data Sing (z :: Ordering) Source # 
Instance details
data Sing (z :: Ordering) where
data Sing (a :: Type) Source # 
Instance details
data Sing (a :: Type) = STypeRep (TypeRep a)
data Sing (n :: Nat) Source # 
Instance details
data Sing (n :: Nat) where
data Sing (n :: Symbol) Source # 
Instance details
data Sing (n :: Symbol) where
data Sing (z :: ()) Source # 
Instance details
data Sing (z :: ()) where
data Sing (z :: Void) Source # 
Instance details
data Sing (z :: Void)
data Sing (z :: [a]) Source # 
Instance details
data Sing (z :: [a]) where
data Sing (z :: Maybe a) Source # 
Instance details
data Sing (z :: Maybe a) where
data Sing (z :: NonEmpty a) Source # 
Instance details
data Sing (z :: NonEmpty a) where
data Sing (z :: Either a b) Source # 
Instance details
data Sing (z :: Either a b) where
data Sing (z :: (a, b)) Source # 
Instance details
data Sing (z :: (a, b)) where
data Sing (f :: k1 ~> k2) Source # 
Instance details
data Sing (f :: k1 ~> k2) = SLambda {}
data Sing (z :: (a, b, c)) Source # 
Instance details
data Sing (z :: (a, b, c)) where
data Sing (z :: (a, b, c, d)) Source # 
Instance details
data Sing (z :: (a, b, c, d)) where
data Sing (z :: (a, b, c, d, e)) Source # 
Instance details
data Sing (z :: (a, b, c, d, e)) where
data Sing (z :: (a, b, c, d, e, f)) Source # 
Instance details
data Sing (z :: (a, b, c, d, e, f)) where
data Sing (z :: (a, b, c, d, e, f, g)) Source # 
Instance details
data Sing (z :: (a, b, c, d, e, f, g)) where

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.

Orphan instances

SingKind Type Source # 
Instance details

Associated Types

type Demote Type = (r :: *) Source #

SDecide Type Source # 
Instance details

Methods

(%~) :: Sing a -> Sing b -> Decision (a :~: b) Source #

PEq Type Source # 
Instance details

Associated Types

type x == y :: Bool Source #

type x /= y :: Bool Source #

SEq Type Source # 
Instance details

Methods

(%==) :: Sing a -> Sing b -> Sing (a == b) Source #

(%/=) :: Sing a -> Sing b -> Sing (a /= b) Source #

ShowSing Type Source # 
Instance details

Methods

showsSingPrec :: Int -> Sing a -> ShowS Source #

Typeable a => SingI (a :: *) Source # 
Instance details

Methods

sing :: Sing a Source #

Eq (Sing a) Source # 
Instance details

Methods

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

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

Ord (Sing a) Source # 
Instance details

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 a) Source # 
Instance details

Methods

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

show :: Sing a -> String #

showList :: [Sing a] -> ShowS #