singletons-2.3.1: 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 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) #

The singleton kind-indexed data family.

Instances

data Sing Bool # 
data Sing Bool where
data Sing Ordering # 
data Sing * # 
data Sing * where
data Sing Nat # 
data Sing Nat where
data Sing Symbol # 
data Sing Symbol where
data Sing () # 
data Sing () where
data Sing [a] # 
data Sing [a] where
data Sing (Maybe a) # 
data Sing (Maybe a) where
data Sing (NonEmpty a) # 
data Sing (NonEmpty a) where
data Sing (Either a b) # 
data Sing (Either a b) where
data Sing (a, b) # 
data Sing (a, b) where
data Sing ((~>) k1 k2) # 
data Sing ((~>) k1 k2) = SLambda {}
data Sing (a, b, c) # 
data Sing (a, b, c) where
data Sing (a, b, c, d) # 
data Sing (a, b, c, d) where
data Sing (a, b, c, d, e) # 
data Sing (a, b, c, d, e) where
data Sing (a, b, c, d, e, f) # 
data Sing (a, b, c, d, e, f) where
data Sing (a, b, c, d, e, f, g) # 
data Sing (a, b, c, d, e, f, g) 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 # 

Associated Types

type Demote Type = (r :: *) #

SDecide Type # 

Methods

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

PEq Type # 

Associated Types

type (Type :== (x :: Type)) (y :: Type) :: Bool #

type (Type :/= (x :: Type)) (y :: Type) :: Bool #

SEq Type # 

Methods

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

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

Typeable * a => SingI * a # 

Methods

sing :: Sing a a #

TestCoercion * (Sing *) # 

Methods

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