singletons-2.2: A framework for generating singleton types

Copyright(C) 2013 Richard Eisenberg
LicenseBSD-style (see LICENSE)
MaintainerRichard Eisenberg (eir@cis.upenn.edu)
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Data.Singletons.TypeRepStar

Contents

Description

This module defines singleton instances making Typeable 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 Bool Source # 
data Sing Bool where
data Sing Ordering Source # 
data Sing * Source # 
data Sing * where
data Sing Nat Source # 
data Sing Nat where
data Sing Symbol Source # 
data Sing Symbol where
data Sing () Source # 
data Sing () where
data Sing [a0] Source # 
data Sing [a0] where
data Sing (Maybe a0) Source # 
data Sing (Maybe a0) where
data Sing (NonEmpty a0) Source # 
data Sing (NonEmpty a0) where
data Sing (Either a0 b0) Source # 
data Sing (Either a0 b0) where
data Sing (a0, b0) Source # 
data Sing (a0, b0) where
data Sing ((~>) k1 k2) Source # 
data Sing ((~>) k1 k2) = SLambda {}
data Sing (a0, b0, c0) Source # 
data Sing (a0, b0, c0) where
data Sing (a0, b0, c0, d0) Source # 
data Sing (a0, b0, c0, d0) where
data Sing (a0, b0, c0, d0, e0) Source # 
data Sing (a0, b0, c0, d0, e0) where
data Sing (a0, b0, c0, d0, e0, f0) Source # 
data Sing (a0, b0, c0, d0, e0, f0) where
data Sing (a0, b0, c0, d0, e0, f0, g0) Source # 
data Sing (a0, b0, c0, d0, e0, f0, g0) where

Here is the definition of the singleton for *:

data instance Sing (a :: *) where
  STypeRep :: Typeable a => Sing a

Instances for SingI, SingKind, SEq, SDecide, and TestCoercion are also supplied.

Orphan instances

SingKind Type Source # 
SDecide Type Source # 

Methods

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

SEq Type Source # 

Methods

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

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

Typeable * a => SingI * a Source # 

Methods

sing :: Sing a a Source #

PEq Type (Proxy * Type) Source # 

Associated Types

type ((Proxy * Type) :== (x :: Proxy * Type)) (y :: Proxy * Type) :: Bool Source #

type ((Proxy * Type) :/= (x :: Proxy * Type)) (y :: Proxy * Type) :: Bool Source #

TestCoercion * (Sing *) Source # 

Methods

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