symantic-base-0.2.0.20210731: Commonly useful symantics for Embedded Domain-Specific Languages (EDSL)
Safe HaskellNone
LanguageHaskell2010

Symantic.CurryN

Synopsis

Class CurryN

class CurryN args where Source #

Produce and consume Tuples. Not actually useful for the Generic side of this module, but related through the use of Tuples.

Methods

curryN :: (Tuples args -> res) -> args -..-> res Source #

uncurryN :: (args -..-> res) -> Tuples args -> res Source #

mapresultN :: (a -> b) -> (args -..-> a) -> args -..-> b Source #

Instances

Instances details
CurryN (b ': as) => CurryN (a ': (b ': as)) Source # 
Instance details

Defined in Symantic.CurryN

Methods

curryN :: (Tuples (a ': (b ': as)) -> res) -> (a ': (b ': as)) -..-> res Source #

uncurryN :: ((a ': (b ': as)) -..-> res) -> Tuples (a ': (b ': as)) -> res Source #

mapresultN :: (a0 -> b0) -> ((a ': (b ': as)) -..-> a0) -> (a ': (b ': as)) -..-> b0 Source #

CurryN '[a] Source # 
Instance details

Defined in Symantic.CurryN

Methods

curryN :: (Tuples '[a] -> res) -> '[a] -..-> res Source #

uncurryN :: ('[a] -..-> res) -> Tuples '[a] -> res Source #

mapresultN :: (a0 -> b) -> ('[a] -..-> a0) -> '[a] -..-> b Source #

Type family (-..->)

type family (args :: [*]) -..-> (r :: *) :: * where ... Source #

Equations

'[] -..-> r = r 
(a ': args) -..-> r = a -> args -..-> r 

Type family Args

type family Args (f :: *) :: [*] where ... Source #

Equations

Args (a -> r) = a ': Args r 
Args r = '[] 

Type family Result

type family Result (as :: *) :: * where ... Source #

Equations

Result (a -> r) = Result r 
Result r = r