singletons-2.7: A framework for generating singleton types
Copyright(C) 2016 Richard Eisenberg
LicenseBSD-style (see LICENSE)
MaintainerRyan Scott
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Data.Singletons.Prelude.Function

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
  • type family Id a where ...
  • sId :: forall a (t :: a). Sing t -> Sing (Apply IdSym0 t :: a)
  • type family Const a a where ...
  • sConst :: forall a b (t :: a) (t :: b). Sing t -> Sing t -> Sing (Apply (Apply ConstSym0 t) t :: a)
  • type family (a . a) a where ...
  • (%.) :: forall b c a (t :: (~>) b c) (t :: (~>) a b) (t :: a). Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply (.@#@$) t) t) t :: c)
  • type family Flip a a a where ...
  • sFlip :: forall a b c (t :: (~>) a ((~>) b c)) (t :: b) (t :: a). Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply FlipSym0 t) t) t :: c)
  • type family a $ a where ...
  • (%$) :: forall a b (t :: (~>) a b) (t :: a). Sing t -> Sing t -> Sing (Apply (Apply ($@#@$) t) t :: b)
  • type family a & a where ...
  • (%&) :: forall a b (t :: a) (t :: (~>) a b). Sing t -> Sing t -> Sing (Apply (Apply (&@#@$) t) t :: b)
  • type family On a a a a where ...
  • sOn :: forall b c a (t :: (~>) b ((~>) b c)) (t :: (~>) a b) (t :: a) (t :: a). Sing t -> Sing t -> Sing t -> Sing t -> Sing (Apply (Apply (Apply (Apply OnSym0 t) t) t) t :: c)
  • data IdSym0 a6989586621679534205
  • type IdSym1 (a6989586621679534205 :: a) = Id a6989586621679534205 :: a
  • data ConstSym0 a6989586621679534200
  • data ConstSym1 a6989586621679534200 a6989586621679534201
  • type ConstSym2 (a6989586621679534200 :: a) (a6989586621679534201 :: b) = Const a6989586621679534200 a6989586621679534201 :: a
  • data (.@#@$) a6989586621679534187
  • data a6989586621679534187 .@#@$$ a6989586621679534188
  • data (a6989586621679534187 .@#@$$$ a6989586621679534188) a6989586621679534189
  • type (.@#@$$$$) (a6989586621679534187 :: (~>) b c) (a6989586621679534188 :: (~>) a b) (a6989586621679534189 :: a) = (.) a6989586621679534187 a6989586621679534188 a6989586621679534189 :: c
  • data FlipSym0 a6989586621679534175
  • data FlipSym1 a6989586621679534175 a6989586621679534176
  • data FlipSym2 a6989586621679534175 a6989586621679534176 a6989586621679534177
  • type FlipSym3 (a6989586621679534175 :: (~>) a ((~>) b c)) (a6989586621679534176 :: b) (a6989586621679534177 :: a) = Flip a6989586621679534175 a6989586621679534176 a6989586621679534177 :: c
  • data ($@#@$) a6989586621679534156
  • data a6989586621679534156 $@#@$$ a6989586621679534157
  • type ($@#@$$$) (a6989586621679534156 :: (~>) a b) (a6989586621679534157 :: a) = ($) a6989586621679534156 a6989586621679534157 :: b
  • data (&@#@$) a6989586621679747410
  • data a6989586621679747410 &@#@$$ a6989586621679747411
  • type (&@#@$$$) (a6989586621679747410 :: a) (a6989586621679747411 :: (~>) a b) = (&) a6989586621679747410 a6989586621679747411 :: b
  • data OnSym0 a6989586621679747423
  • data OnSym1 a6989586621679747423 a6989586621679747424
  • data OnSym2 a6989586621679747423 a6989586621679747424 a6989586621679747425
  • data OnSym3 a6989586621679747423 a6989586621679747424 a6989586621679747425 a6989586621679747426
  • type OnSym4 (a6989586621679747423 :: (~>) b ((~>) b c)) (a6989586621679747424 :: (~>) a b) (a6989586621679747425 :: a) (a6989586621679747426 :: a) = On a6989586621679747423 a6989586621679747424 a6989586621679747425 a6989586621679747426 :: c

Prelude re-exports

type family Id a where ... Source #

Equations

Id x = x 

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

type family Const a a where ... Source #

Equations

Const x _ = x 

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

type family (a . a) a where ... infixr 9 Source #

Equations

(f . g) a_6989586621679534181 = Apply (Apply (Apply (Apply Lambda_6989586621679534193Sym0 f) g) a_6989586621679534181) a_6989586621679534181 

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

type family Flip a a a where ... Source #

Equations

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

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

type family a $ a where ... infixr 0 Source #

Equations

f $ x = Apply f x 

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

Other combinators

type family a & a where ... infixl 1 Source #

Equations

x & f = Apply f x 

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

type family On a a a a where ... infixl 0 Source #

Equations

On ty f a_6989586621679747414 a_6989586621679747416 = Apply (Apply (Apply (Apply (Apply (Apply Lambda_6989586621679747431Sym0 ty) f) a_6989586621679747414) a_6989586621679747416) a_6989586621679747414) a_6989586621679747416 

sOn :: forall b c a (t :: (~>) b ((~>) b c)) (t :: (~>) a b) (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 Source #

Defunctionalization symbols

data IdSym0 a6989586621679534205 Source #

Instances

Instances details
SingI (IdSym0 :: TyFun a a -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

Methods

sing :: Sing IdSym0 Source #

SuppressUnusedWarnings (IdSym0 :: TyFun a a -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (IdSym0 :: TyFun a a -> Type) (a6989586621679534205 :: a) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (IdSym0 :: TyFun a a -> Type) (a6989586621679534205 :: a) = IdSym1 a6989586621679534205

type IdSym1 (a6989586621679534205 :: a) = Id a6989586621679534205 :: a Source #

data ConstSym0 a6989586621679534200 Source #

Instances

Instances details
SingI (ConstSym0 :: TyFun a (b ~> a) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

SuppressUnusedWarnings (ConstSym0 :: TyFun a (b ~> a) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (ConstSym0 :: TyFun a (b ~> a) -> Type) (a6989586621679534200 :: a) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (ConstSym0 :: TyFun a (b ~> a) -> Type) (a6989586621679534200 :: a) = ConstSym1 a6989586621679534200 :: TyFun b a -> Type

data ConstSym1 a6989586621679534200 a6989586621679534201 Source #

Instances

Instances details
SingI d => SingI (ConstSym1 d :: TyFun b a -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

Methods

sing :: Sing (ConstSym1 d) Source #

SuppressUnusedWarnings (ConstSym1 a6989586621679534200 :: TyFun b a -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (ConstSym1 a6989586621679534200 :: TyFun b a -> Type) (a6989586621679534201 :: b) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (ConstSym1 a6989586621679534200 :: TyFun b a -> Type) (a6989586621679534201 :: b) = ConstSym2 a6989586621679534200 a6989586621679534201

type ConstSym2 (a6989586621679534200 :: a) (a6989586621679534201 :: b) = Const a6989586621679534200 a6989586621679534201 :: a Source #

data (.@#@$) a6989586621679534187 infixr 9 Source #

Instances

Instances details
SingI ((.@#@$) :: TyFun (b ~> c) ((a ~> b) ~> (a ~> c)) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

SuppressUnusedWarnings ((.@#@$) :: TyFun (b ~> c) ((a ~> b) ~> (a ~> c)) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply ((.@#@$) :: TyFun (b ~> c) ((a ~> b) ~> (a ~> c)) -> Type) (a6989586621679534187 :: b ~> c) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply ((.@#@$) :: TyFun (b ~> c) ((a ~> b) ~> (a ~> c)) -> Type) (a6989586621679534187 :: b ~> c) = (.@#@$$) a6989586621679534187 :: TyFun (a ~> b) (a ~> c) -> Type

data a6989586621679534187 .@#@$$ a6989586621679534188 infixr 9 Source #

Instances

Instances details
SingI d => SingI ((.@#@$$) d :: TyFun (a ~> b) (a ~> c) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

Methods

sing :: Sing ((.@#@$$) d) Source #

SuppressUnusedWarnings ((.@#@$$) a6989586621679534187 :: TyFun (a ~> b) (a ~> c) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply ((.@#@$$) a6989586621679534187 :: TyFun (a ~> b) (a ~> c) -> Type) (a6989586621679534188 :: a ~> b) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply ((.@#@$$) a6989586621679534187 :: TyFun (a ~> b) (a ~> c) -> Type) (a6989586621679534188 :: a ~> b) = a6989586621679534187 .@#@$$$ a6989586621679534188

data (a6989586621679534187 .@#@$$$ a6989586621679534188) a6989586621679534189 infixr 9 Source #

Instances

Instances details
(SingI d1, SingI d2) => SingI (d1 .@#@$$$ d2 :: TyFun a c -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

Methods

sing :: Sing (d1 .@#@$$$ d2) Source #

SuppressUnusedWarnings (a6989586621679534187 .@#@$$$ a6989586621679534188 :: TyFun a c -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (a6989586621679534187 .@#@$$$ a6989586621679534188 :: TyFun a c -> Type) (a6989586621679534189 :: a) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (a6989586621679534187 .@#@$$$ a6989586621679534188 :: TyFun a c -> Type) (a6989586621679534189 :: a) = (a6989586621679534187 .@#@$$$$ a6989586621679534188) a6989586621679534189

type (.@#@$$$$) (a6989586621679534187 :: (~>) b c) (a6989586621679534188 :: (~>) a b) (a6989586621679534189 :: a) = (.) a6989586621679534187 a6989586621679534188 a6989586621679534189 :: c infixr 9 Source #

data FlipSym0 a6989586621679534175 Source #

Instances

Instances details
SingI (FlipSym0 :: TyFun (a ~> (b ~> c)) (b ~> (a ~> c)) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

SuppressUnusedWarnings (FlipSym0 :: TyFun (a ~> (b ~> c)) (b ~> (a ~> c)) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (FlipSym0 :: TyFun (a ~> (b ~> c)) (b ~> (a ~> c)) -> Type) (a6989586621679534175 :: a ~> (b ~> c)) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (FlipSym0 :: TyFun (a ~> (b ~> c)) (b ~> (a ~> c)) -> Type) (a6989586621679534175 :: a ~> (b ~> c)) = FlipSym1 a6989586621679534175

data FlipSym1 a6989586621679534175 a6989586621679534176 Source #

Instances

Instances details
SingI d => SingI (FlipSym1 d :: TyFun b (a ~> c) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

Methods

sing :: Sing (FlipSym1 d) Source #

SuppressUnusedWarnings (FlipSym1 a6989586621679534175 :: TyFun b (a ~> c) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (FlipSym1 a6989586621679534175 :: TyFun b (a ~> c) -> Type) (a6989586621679534176 :: b) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (FlipSym1 a6989586621679534175 :: TyFun b (a ~> c) -> Type) (a6989586621679534176 :: b) = FlipSym2 a6989586621679534175 a6989586621679534176

data FlipSym2 a6989586621679534175 a6989586621679534176 a6989586621679534177 Source #

Instances

Instances details
(SingI d1, SingI d2) => SingI (FlipSym2 d1 d2 :: TyFun a c -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

Methods

sing :: Sing (FlipSym2 d1 d2) Source #

SuppressUnusedWarnings (FlipSym2 a6989586621679534175 a6989586621679534176 :: TyFun a c -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (FlipSym2 a6989586621679534175 a6989586621679534176 :: TyFun a c -> Type) (a6989586621679534177 :: a) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (FlipSym2 a6989586621679534175 a6989586621679534176 :: TyFun a c -> Type) (a6989586621679534177 :: a) = FlipSym3 a6989586621679534175 a6989586621679534176 a6989586621679534177

type FlipSym3 (a6989586621679534175 :: (~>) a ((~>) b c)) (a6989586621679534176 :: b) (a6989586621679534177 :: a) = Flip a6989586621679534175 a6989586621679534176 a6989586621679534177 :: c Source #

data ($@#@$) a6989586621679534156 infixr 0 Source #

Instances

Instances details
SingI (($@#@$) :: TyFun (a ~> b) (a ~> b) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

SuppressUnusedWarnings (($@#@$) :: TyFun (a ~> b) (a ~> b) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (($@#@$) :: TyFun (a ~> b) (a ~> b) -> Type) (a6989586621679534156 :: a ~> b) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (($@#@$) :: TyFun (a ~> b) (a ~> b) -> Type) (a6989586621679534156 :: a ~> b) = ($@#@$$) a6989586621679534156

data a6989586621679534156 $@#@$$ a6989586621679534157 infixr 0 Source #

Instances

Instances details
SingI d => SingI (($@#@$$) d :: TyFun a b -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

Methods

sing :: Sing (($@#@$$) d) Source #

SuppressUnusedWarnings (($@#@$$) a6989586621679534156 :: TyFun a b -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (($@#@$$) a6989586621679534156 :: TyFun a b -> Type) (a6989586621679534157 :: a) Source # 
Instance details

Defined in Data.Singletons.Prelude.Base

type Apply (($@#@$$) a6989586621679534156 :: TyFun a b -> Type) (a6989586621679534157 :: a) = a6989586621679534156 $@#@$$$ a6989586621679534157

type ($@#@$$$) (a6989586621679534156 :: (~>) a b) (a6989586621679534157 :: a) = ($) a6989586621679534156 a6989586621679534157 :: b infixr 0 Source #

data (&@#@$) a6989586621679747410 infixl 1 Source #

Instances

Instances details
SingI ((&@#@$) :: TyFun a ((a ~> b) ~> b) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Function

SuppressUnusedWarnings ((&@#@$) :: TyFun a ((a ~> b) ~> b) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply ((&@#@$) :: TyFun a ((a ~> b) ~> b) -> Type) (a6989586621679747410 :: a) Source # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply ((&@#@$) :: TyFun a ((a ~> b) ~> b) -> Type) (a6989586621679747410 :: a) = (&@#@$$) a6989586621679747410 :: TyFun (a ~> b) b -> Type

data a6989586621679747410 &@#@$$ a6989586621679747411 infixl 1 Source #

Instances

Instances details
SingI d => SingI ((&@#@$$) d :: TyFun (a ~> b) b -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Function

Methods

sing :: Sing ((&@#@$$) d) Source #

SuppressUnusedWarnings ((&@#@$$) a6989586621679747410 :: TyFun (a ~> b) b -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply ((&@#@$$) a6989586621679747410 :: TyFun (a ~> b) b -> Type) (a6989586621679747411 :: a ~> b) Source # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply ((&@#@$$) a6989586621679747410 :: TyFun (a ~> b) b -> Type) (a6989586621679747411 :: a ~> b) = a6989586621679747410 &@#@$$$ a6989586621679747411

type (&@#@$$$) (a6989586621679747410 :: a) (a6989586621679747411 :: (~>) a b) = (&) a6989586621679747410 a6989586621679747411 :: b infixl 1 Source #

data OnSym0 a6989586621679747423 infixl 0 Source #

Instances

Instances details
SingI (OnSym0 :: TyFun (b ~> (b ~> c)) ((a ~> b) ~> (a ~> (a ~> c))) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Function

Methods

sing :: Sing OnSym0 Source #

SuppressUnusedWarnings (OnSym0 :: TyFun (b ~> (b ~> c)) ((a ~> b) ~> (a ~> (a ~> c))) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply (OnSym0 :: TyFun (b ~> (b ~> c)) ((a ~> b) ~> (a ~> (a ~> c))) -> Type) (a6989586621679747423 :: b ~> (b ~> c)) Source # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply (OnSym0 :: TyFun (b ~> (b ~> c)) ((a ~> b) ~> (a ~> (a ~> c))) -> Type) (a6989586621679747423 :: b ~> (b ~> c)) = OnSym1 a6989586621679747423 :: TyFun (a ~> b) (a ~> (a ~> c)) -> Type

data OnSym1 a6989586621679747423 a6989586621679747424 infixl 0 Source #

Instances

Instances details
SingI d => SingI (OnSym1 d :: TyFun (a ~> b) (a ~> (a ~> c)) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Function

Methods

sing :: Sing (OnSym1 d) Source #

SuppressUnusedWarnings (OnSym1 a6989586621679747423 :: TyFun (a ~> b) (a ~> (a ~> c)) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply (OnSym1 a6989586621679747423 :: TyFun (a ~> b) (a ~> (a ~> c)) -> Type) (a6989586621679747424 :: a ~> b) Source # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply (OnSym1 a6989586621679747423 :: TyFun (a ~> b) (a ~> (a ~> c)) -> Type) (a6989586621679747424 :: a ~> b) = OnSym2 a6989586621679747423 a6989586621679747424

data OnSym2 a6989586621679747423 a6989586621679747424 a6989586621679747425 infixl 0 Source #

Instances

Instances details
(SingI d1, SingI d2) => SingI (OnSym2 d1 d2 :: TyFun a (a ~> c) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Function

Methods

sing :: Sing (OnSym2 d1 d2) Source #

SuppressUnusedWarnings (OnSym2 a6989586621679747423 a6989586621679747424 :: TyFun a (a ~> c) -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply (OnSym2 a6989586621679747423 a6989586621679747424 :: TyFun a (a ~> c) -> Type) (a6989586621679747425 :: a) Source # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply (OnSym2 a6989586621679747423 a6989586621679747424 :: TyFun a (a ~> c) -> Type) (a6989586621679747425 :: a) = OnSym3 a6989586621679747423 a6989586621679747424 a6989586621679747425

data OnSym3 a6989586621679747423 a6989586621679747424 a6989586621679747425 a6989586621679747426 infixl 0 Source #

Instances

Instances details
(SingI d1, SingI d2, SingI d3) => SingI (OnSym3 d1 d2 d3 :: TyFun a c -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Function

Methods

sing :: Sing (OnSym3 d1 d2 d3) Source #

SuppressUnusedWarnings (OnSym3 a6989586621679747423 a6989586621679747424 a6989586621679747425 :: TyFun a c -> Type) Source # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply (OnSym3 a6989586621679747423 a6989586621679747424 a6989586621679747425 :: TyFun a c -> Type) (a6989586621679747426 :: a) Source # 
Instance details

Defined in Data.Singletons.Prelude.Function

type Apply (OnSym3 a6989586621679747423 a6989586621679747424 a6989586621679747425 :: TyFun a c -> Type) (a6989586621679747426 :: a) = OnSym4 a6989586621679747423 a6989586621679747424 a6989586621679747425 a6989586621679747426

type OnSym4 (a6989586621679747423 :: (~>) b ((~>) b c)) (a6989586621679747424 :: (~>) a b) (a6989586621679747425 :: a) (a6989586621679747426 :: a) = On a6989586621679747423 a6989586621679747424 a6989586621679747425 a6989586621679747426 :: c infixl 0 Source #