singletons-0.9.3: A framework for generating singleton types

Copyright(C) 2013 Richard Eisenberg
License(C) 2013 Richard Eisenberg
MaintainerRichard Eisenberg (
Safe HaskellNone




Defines functions and datatypes relating to the singleton for tuples, including a singletons version of all the definitions in Data.Tuple.

Because many of these definitions are produced by Template Haskell, it is not possible to create proper Haddock documentation. Please look up the corresponding operation in Data.Tuple. Also, please excuse the apparent repeated variable names. This is due to an interaction between Template Haskell and Haddock.


Singleton definitions

See Sing for more info.

data family Sing a Source

The singleton kind-indexed data family.

type STuple0 z = Sing zSource

type STuple2 z = Sing zSource

type STuple3 z = Sing zSource

type STuple4 z = Sing zSource

type STuple5 z = Sing zSource

type STuple6 z = Sing zSource

type STuple7 z = Sing zSource

Singletons from Data.Tuple

type family Fst a :: aSource

sFst :: forall t. Sing t -> Sing (Fst t)Source

type family Snd a :: bSource

sSnd :: forall t. Sing t -> Sing (Snd t)Source

type family Curry a a a :: cSource

sCurry :: forall t t t. (forall t. Sing t -> Sing (t t)) -> Sing t -> Sing t -> Sing (Curry t t t)Source

type family Uncurry a a :: cSource

sUncurry :: forall t t. (forall t. Sing t -> forall t. Sing t -> Sing (t t t)) -> Sing t -> Sing (Uncurry t t)Source

type family Swap a :: (b, a)Source

sSwap :: forall t. Sing t -> Sing (Swap t)Source