singletons-2.4.1: A framework for generating singleton types

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

Data.Singletons.Prelude.Function

Contents

Description

Defines singleton versions of the definitions in Data.Function.

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.Function. Also, please excuse the apparent repeated variable names. This is due to an interaction between Template Haskell and Haddock.

Synopsis

Prelude re-exports

type family Id (a :: a) :: a where ... #

Equations

Id x = x 

sId :: forall (t :: a). Sing t -> Sing (Apply IdSym0 t :: a) #

type family Const (a :: a) (a :: b) :: a where ... #

Equations

Const x _ = x 

sConst :: forall (t :: a) (t :: b). Sing t -> Sing t -> Sing (Apply (Apply ConstSym0 t) t :: a) #

type family ((a :: TyFun b c -> Type) :. (a :: TyFun a b -> Type)) (a :: a) :: c where ... #

Equations

(f :. g) a_6989586621679436592 = Apply (Apply (Apply (Apply Lambda_6989586621679436597Sym0 f) g) a_6989586621679436592) a_6989586621679436592 

(%.) :: forall (t :: TyFun b c -> Type) (t :: TyFun a b -> Type) (t :: a). Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply (.@#@$) t) t) t :: c) infixr 9 #

type family Flip (a :: TyFun a (TyFun b c -> Type) -> Type) (a :: b) (a :: a) :: c where ... #

Equations

Flip f x y = Apply (Apply f y) x 

sFlip :: forall (t :: TyFun a (TyFun b c -> Type) -> Type) (t :: b) (t :: a). Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply FlipSym0 t) t) t :: c) #

type family (a :: TyFun a b -> Type) $ (a :: a) :: b where ... #

Equations

f $ x = Apply f x 

(%$) :: forall (t :: TyFun a b -> Type) (t :: a). Sing t -> Sing t -> Sing (Apply (Apply ($@#@$) t) t :: b) infixr 0 #

Other combinators

type family (a :: a) & (a :: TyFun a b -> Type) :: b where ... #

Equations

x & f = Apply f x 

(%&) :: forall (t :: a) (t :: TyFun a b -> Type). Sing t -> Sing t -> Sing (Apply (Apply (&@#@$) t) t :: b) infixl 1 #

type family On (a :: TyFun b (TyFun b c -> Type) -> Type) (a :: TyFun a b -> Type) (a :: a) (a :: a) :: c where ... infixl 0 #

Equations

On ty f a_6989586621679783714 a_6989586621679783716 = Apply (Apply (Apply (Apply (Apply (Apply Lambda_6989586621679783722Sym0 ty) f) a_6989586621679783714) a_6989586621679783716) a_6989586621679783714) a_6989586621679783716 

sOn :: forall (t :: TyFun b (TyFun b c -> Type) -> Type) (t :: TyFun a b -> Type) (t :: a) (t :: a). Sing t -> Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply (Apply OnSym0 t) t) t) t :: c) infixl 0 #

Defunctionalization symbols

data IdSym0 (l :: TyFun a6989586621679436420 a6989586621679436420) #

Instances
SuppressUnusedWarnings (IdSym0 :: TyFun a6989586621679436420 a6989586621679436420 -> *) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (IdSym0 :: TyFun a a -> *) (l :: a) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (IdSym0 :: TyFun a a -> *) (l :: a) = Id l

type IdSym1 (t :: a6989586621679436420) = Id t #

data ConstSym0 (l :: TyFun a6989586621679436418 (TyFun b6989586621679436419 a6989586621679436418 -> Type)) #

Instances
SuppressUnusedWarnings (ConstSym0 :: TyFun a6989586621679436418 (TyFun b6989586621679436419 a6989586621679436418 -> Type) -> *) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (ConstSym0 :: TyFun a6989586621679436418 (TyFun b6989586621679436419 a6989586621679436418 -> Type) -> *) (l :: a6989586621679436418) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (ConstSym0 :: TyFun a6989586621679436418 (TyFun b6989586621679436419 a6989586621679436418 -> Type) -> *) (l :: a6989586621679436418) = (ConstSym1 l :: TyFun b6989586621679436419 a6989586621679436418 -> *)

data ConstSym1 (l :: a6989586621679436418) (l :: TyFun b6989586621679436419 a6989586621679436418) #

Instances
SuppressUnusedWarnings (ConstSym1 :: a6989586621679436418 -> TyFun b6989586621679436419 a6989586621679436418 -> *) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (ConstSym1 l1 :: TyFun b a -> *) (l2 :: b) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (ConstSym1 l1 :: TyFun b a -> *) (l2 :: b) = Const l1 l2

type ConstSym2 (t :: a6989586621679436418) (t :: b6989586621679436419) = Const t t #

data (.@#@$) (l :: TyFun (TyFun b6989586621679436415 c6989586621679436416 -> Type) (TyFun (TyFun a6989586621679436417 b6989586621679436415 -> Type) (TyFun a6989586621679436417 c6989586621679436416 -> Type) -> Type)) #

Instances
SuppressUnusedWarnings ((.@#@$) :: TyFun (TyFun b6989586621679436415 c6989586621679436416 -> Type) (TyFun (TyFun a6989586621679436417 b6989586621679436415 -> Type) (TyFun a6989586621679436417 c6989586621679436416 -> Type) -> Type) -> *) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply ((.@#@$) :: TyFun (TyFun b6989586621679436415 c6989586621679436416 -> Type) (TyFun (TyFun a6989586621679436417 b6989586621679436415 -> Type) (TyFun a6989586621679436417 c6989586621679436416 -> Type) -> Type) -> *) (l :: TyFun b6989586621679436415 c6989586621679436416 -> Type) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply ((.@#@$) :: TyFun (TyFun b6989586621679436415 c6989586621679436416 -> Type) (TyFun (TyFun a6989586621679436417 b6989586621679436415 -> Type) (TyFun a6989586621679436417 c6989586621679436416 -> Type) -> Type) -> *) (l :: TyFun b6989586621679436415 c6989586621679436416 -> Type) = ((.@#@$$) l :: TyFun (TyFun a6989586621679436417 b6989586621679436415 -> Type) (TyFun a6989586621679436417 c6989586621679436416 -> Type) -> *)

data (l :: TyFun b6989586621679436415 c6989586621679436416 -> Type) .@#@$$ (l :: TyFun (TyFun a6989586621679436417 b6989586621679436415 -> Type) (TyFun a6989586621679436417 c6989586621679436416 -> Type)) #

Instances
SuppressUnusedWarnings ((.@#@$$) :: (TyFun b6989586621679436415 c6989586621679436416 -> Type) -> TyFun (TyFun a6989586621679436417 b6989586621679436415 -> Type) (TyFun a6989586621679436417 c6989586621679436416 -> Type) -> *) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply ((.@#@$$) l1 :: TyFun (TyFun a6989586621679436417 b6989586621679436415 -> Type) (TyFun a6989586621679436417 c6989586621679436416 -> Type) -> *) (l2 :: TyFun a6989586621679436417 b6989586621679436415 -> Type) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply ((.@#@$$) l1 :: TyFun (TyFun a6989586621679436417 b6989586621679436415 -> Type) (TyFun a6989586621679436417 c6989586621679436416 -> Type) -> *) (l2 :: TyFun a6989586621679436417 b6989586621679436415 -> Type) = l1 .@#@$$$ l2

data ((l :: TyFun b6989586621679436415 c6989586621679436416 -> Type) .@#@$$$ (l :: TyFun a6989586621679436417 b6989586621679436415 -> Type)) (l :: TyFun a6989586621679436417 c6989586621679436416) #

Instances
SuppressUnusedWarnings ((.@#@$$$) :: (TyFun b6989586621679436415 c6989586621679436416 -> Type) -> (TyFun a6989586621679436417 b6989586621679436415 -> Type) -> TyFun a6989586621679436417 c6989586621679436416 -> *) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (l1 .@#@$$$ l2 :: TyFun a c -> *) (l3 :: a) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (l1 .@#@$$$ l2 :: TyFun a c -> *) (l3 :: a) = (l1 :. l2) l3

type (.@#@$$$$) (t :: TyFun b6989586621679436415 c6989586621679436416 -> Type) (t :: TyFun a6989586621679436417 b6989586621679436415 -> Type) (t :: a6989586621679436417) = (:.) t t t #

data FlipSym0 (l :: TyFun (TyFun a6989586621679436412 (TyFun b6989586621679436413 c6989586621679436414 -> Type) -> Type) (TyFun b6989586621679436413 (TyFun a6989586621679436412 c6989586621679436414 -> Type) -> Type)) #

Instances
SuppressUnusedWarnings (FlipSym0 :: TyFun (TyFun a6989586621679436412 (TyFun b6989586621679436413 c6989586621679436414 -> Type) -> Type) (TyFun b6989586621679436413 (TyFun a6989586621679436412 c6989586621679436414 -> Type) -> Type) -> *) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (FlipSym0 :: TyFun (TyFun a6989586621679436412 (TyFun b6989586621679436413 c6989586621679436414 -> Type) -> Type) (TyFun b6989586621679436413 (TyFun a6989586621679436412 c6989586621679436414 -> Type) -> Type) -> *) (l :: TyFun a6989586621679436412 (TyFun b6989586621679436413 c6989586621679436414 -> Type) -> Type) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (FlipSym0 :: TyFun (TyFun a6989586621679436412 (TyFun b6989586621679436413 c6989586621679436414 -> Type) -> Type) (TyFun b6989586621679436413 (TyFun a6989586621679436412 c6989586621679436414 -> Type) -> Type) -> *) (l :: TyFun a6989586621679436412 (TyFun b6989586621679436413 c6989586621679436414 -> Type) -> Type) = FlipSym1 l

data FlipSym1 (l :: TyFun a6989586621679436412 (TyFun b6989586621679436413 c6989586621679436414 -> Type) -> Type) (l :: TyFun b6989586621679436413 (TyFun a6989586621679436412 c6989586621679436414 -> Type)) #

Instances
SuppressUnusedWarnings (FlipSym1 :: (TyFun a6989586621679436412 (TyFun b6989586621679436413 c6989586621679436414 -> Type) -> Type) -> TyFun b6989586621679436413 (TyFun a6989586621679436412 c6989586621679436414 -> Type) -> *) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (FlipSym1 l1 :: TyFun b6989586621679436413 (TyFun a6989586621679436412 c6989586621679436414 -> Type) -> *) (l2 :: b6989586621679436413) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (FlipSym1 l1 :: TyFun b6989586621679436413 (TyFun a6989586621679436412 c6989586621679436414 -> Type) -> *) (l2 :: b6989586621679436413) = FlipSym2 l1 l2

data FlipSym2 (l :: TyFun a6989586621679436412 (TyFun b6989586621679436413 c6989586621679436414 -> Type) -> Type) (l :: b6989586621679436413) (l :: TyFun a6989586621679436412 c6989586621679436414) #

Instances
SuppressUnusedWarnings (FlipSym2 :: (TyFun a6989586621679436412 (TyFun b6989586621679436413 c6989586621679436414 -> Type) -> Type) -> b6989586621679436413 -> TyFun a6989586621679436412 c6989586621679436414 -> *) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (FlipSym2 l1 l2 :: TyFun a c -> *) (l3 :: a) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (FlipSym2 l1 l2 :: TyFun a c -> *) (l3 :: a) = Flip l1 l2 l3

type FlipSym3 (t :: TyFun a6989586621679436412 (TyFun b6989586621679436413 c6989586621679436414 -> Type) -> Type) (t :: b6989586621679436413) (t :: a6989586621679436412) = Flip t t t #

data ($@#@$) (l :: TyFun (TyFun a6989586621679436409 b6989586621679436410 -> Type) (TyFun a6989586621679436409 b6989586621679436410 -> Type)) #

Instances
SuppressUnusedWarnings (($@#@$) :: TyFun (TyFun a6989586621679436409 b6989586621679436410 -> Type) (TyFun a6989586621679436409 b6989586621679436410 -> Type) -> *) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (($@#@$) :: TyFun (TyFun a6989586621679436409 b6989586621679436410 -> Type) (TyFun a6989586621679436409 b6989586621679436410 -> Type) -> *) (l :: TyFun a6989586621679436409 b6989586621679436410 -> Type) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (($@#@$) :: TyFun (TyFun a6989586621679436409 b6989586621679436410 -> Type) (TyFun a6989586621679436409 b6989586621679436410 -> Type) -> *) (l :: TyFun a6989586621679436409 b6989586621679436410 -> Type) = ($@#@$$) l

data (l :: TyFun a6989586621679436409 b6989586621679436410 -> Type) $@#@$$ (l :: TyFun a6989586621679436409 b6989586621679436410) #

Instances
SuppressUnusedWarnings (($@#@$$) :: (TyFun a6989586621679436409 b6989586621679436410 -> Type) -> TyFun a6989586621679436409 b6989586621679436410 -> *) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (($@#@$$) l1 :: TyFun a b -> *) (l2 :: a) # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (($@#@$$) l1 :: TyFun a b -> *) (l2 :: a) = l1 $ l2

type ($@#@$$$) (t :: TyFun a6989586621679436409 b6989586621679436410 -> Type) (t :: a6989586621679436409) = ($) t t #

data (&@#@$) (l :: TyFun a6989586621679783668 (TyFun (TyFun a6989586621679783668 b6989586621679783669 -> Type) b6989586621679783669 -> Type)) #

Instances
SuppressUnusedWarnings ((&@#@$) :: TyFun a6989586621679783668 (TyFun (TyFun a6989586621679783668 b6989586621679783669 -> Type) b6989586621679783669 -> Type) -> *) # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply ((&@#@$) :: TyFun a6989586621679783668 (TyFun (TyFun a6989586621679783668 b6989586621679783669 -> Type) b6989586621679783669 -> Type) -> *) (l :: a6989586621679783668) # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply ((&@#@$) :: TyFun a6989586621679783668 (TyFun (TyFun a6989586621679783668 b6989586621679783669 -> Type) b6989586621679783669 -> Type) -> *) (l :: a6989586621679783668) = ((&@#@$$) l :: TyFun (TyFun a6989586621679783668 b6989586621679783669 -> Type) b6989586621679783669 -> *)

data (l :: a6989586621679783668) &@#@$$ (l :: TyFun (TyFun a6989586621679783668 b6989586621679783669 -> Type) b6989586621679783669) #

Instances
SuppressUnusedWarnings ((&@#@$$) :: a6989586621679783668 -> TyFun (TyFun a6989586621679783668 b6989586621679783669 -> Type) b6989586621679783669 -> *) # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply ((&@#@$$) l1 :: TyFun (TyFun a b -> Type) b -> *) (l2 :: TyFun a b -> Type) # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply ((&@#@$$) l1 :: TyFun (TyFun a b -> Type) b -> *) (l2 :: TyFun a b -> Type) = l1 & l2

type (&@#@$$$) (t :: a6989586621679783668) (t :: TyFun a6989586621679783668 b6989586621679783669 -> Type) = (&) t t #

data OnSym0 (l :: TyFun (TyFun b6989586621679783670 (TyFun b6989586621679783670 c6989586621679783671 -> Type) -> Type) (TyFun (TyFun a6989586621679783672 b6989586621679783670 -> Type) (TyFun a6989586621679783672 (TyFun a6989586621679783672 c6989586621679783671 -> Type) -> Type) -> Type)) #

Instances
SuppressUnusedWarnings (OnSym0 :: TyFun (TyFun b6989586621679783670 (TyFun b6989586621679783670 c6989586621679783671 -> Type) -> Type) (TyFun (TyFun a6989586621679783672 b6989586621679783670 -> Type) (TyFun a6989586621679783672 (TyFun a6989586621679783672 c6989586621679783671 -> Type) -> Type) -> Type) -> *) # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply (OnSym0 :: TyFun (TyFun b6989586621679783670 (TyFun b6989586621679783670 c6989586621679783671 -> Type) -> Type) (TyFun (TyFun a6989586621679783672 b6989586621679783670 -> Type) (TyFun a6989586621679783672 (TyFun a6989586621679783672 c6989586621679783671 -> Type) -> Type) -> Type) -> *) (l :: TyFun b6989586621679783670 (TyFun b6989586621679783670 c6989586621679783671 -> Type) -> Type) # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply (OnSym0 :: TyFun (TyFun b6989586621679783670 (TyFun b6989586621679783670 c6989586621679783671 -> Type) -> Type) (TyFun (TyFun a6989586621679783672 b6989586621679783670 -> Type) (TyFun a6989586621679783672 (TyFun a6989586621679783672 c6989586621679783671 -> Type) -> Type) -> Type) -> *) (l :: TyFun b6989586621679783670 (TyFun b6989586621679783670 c6989586621679783671 -> Type) -> Type) = (OnSym1 l :: TyFun (TyFun a6989586621679783672 b6989586621679783670 -> Type) (TyFun a6989586621679783672 (TyFun a6989586621679783672 c6989586621679783671 -> Type) -> Type) -> *)

data OnSym1 (l :: TyFun b6989586621679783670 (TyFun b6989586621679783670 c6989586621679783671 -> Type) -> Type) (l :: TyFun (TyFun a6989586621679783672 b6989586621679783670 -> Type) (TyFun a6989586621679783672 (TyFun a6989586621679783672 c6989586621679783671 -> Type) -> Type)) #

Instances
SuppressUnusedWarnings (OnSym1 :: (TyFun b6989586621679783670 (TyFun b6989586621679783670 c6989586621679783671 -> Type) -> Type) -> TyFun (TyFun a6989586621679783672 b6989586621679783670 -> Type) (TyFun a6989586621679783672 (TyFun a6989586621679783672 c6989586621679783671 -> Type) -> Type) -> *) # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply (OnSym1 l1 :: TyFun (TyFun a6989586621679783672 b6989586621679783670 -> Type) (TyFun a6989586621679783672 (TyFun a6989586621679783672 c6989586621679783671 -> Type) -> Type) -> *) (l2 :: TyFun a6989586621679783672 b6989586621679783670 -> Type) # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply (OnSym1 l1 :: TyFun (TyFun a6989586621679783672 b6989586621679783670 -> Type) (TyFun a6989586621679783672 (TyFun a6989586621679783672 c6989586621679783671 -> Type) -> Type) -> *) (l2 :: TyFun a6989586621679783672 b6989586621679783670 -> Type) = OnSym2 l1 l2

data OnSym2 (l :: TyFun b6989586621679783670 (TyFun b6989586621679783670 c6989586621679783671 -> Type) -> Type) (l :: TyFun a6989586621679783672 b6989586621679783670 -> Type) (l :: TyFun a6989586621679783672 (TyFun a6989586621679783672 c6989586621679783671 -> Type)) #

Instances
SuppressUnusedWarnings (OnSym2 :: (TyFun b6989586621679783670 (TyFun b6989586621679783670 c6989586621679783671 -> Type) -> Type) -> (TyFun a6989586621679783672 b6989586621679783670 -> Type) -> TyFun a6989586621679783672 (TyFun a6989586621679783672 c6989586621679783671 -> Type) -> *) # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply (OnSym2 l1 l2 :: TyFun a6989586621679783672 (TyFun a6989586621679783672 c6989586621679783671 -> Type) -> *) (l3 :: a6989586621679783672) # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply (OnSym2 l1 l2 :: TyFun a6989586621679783672 (TyFun a6989586621679783672 c6989586621679783671 -> Type) -> *) (l3 :: a6989586621679783672) = OnSym3 l1 l2 l3

data OnSym3 (l :: TyFun b6989586621679783670 (TyFun b6989586621679783670 c6989586621679783671 -> Type) -> Type) (l :: TyFun a6989586621679783672 b6989586621679783670 -> Type) (l :: a6989586621679783672) (l :: TyFun a6989586621679783672 c6989586621679783671) #

Instances
SuppressUnusedWarnings (OnSym3 :: (TyFun b6989586621679783670 (TyFun b6989586621679783670 c6989586621679783671 -> Type) -> Type) -> (TyFun a6989586621679783672 b6989586621679783670 -> Type) -> a6989586621679783672 -> TyFun a6989586621679783672 c6989586621679783671 -> *) # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply (OnSym3 l1 l2 l3 :: TyFun a c -> *) (l4 :: a) # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply (OnSym3 l1 l2 l3 :: TyFun a c -> *) (l4 :: a) = On l1 l2 l3 l4

type OnSym4 (t :: TyFun b6989586621679783670 (TyFun b6989586621679783670 c6989586621679783671 -> Type) -> Type) (t :: TyFun a6989586621679783672 b6989586621679783670 -> Type) (t :: a6989586621679783672) (t :: a6989586621679783672) = On t t t t #