Safe Haskell | None |
---|---|

Language | Haskell2010 |

# Documentation

type family TypeListToArity xs r :: * Source

TypeListToArity [] r = r | |

TypeListToArity (x : xs) r = x -> TypeListToArity xs r |

type family ArityMinusTypeList r xs :: * Source

ArityMinusTypeList r [] = r | |

ArityMinusTypeList (x -> r) (x : xs) = ArityMinusTypeList r xs |

type family ExpectArity xs f :: Constraint Source

ExpectArity [] f = () | |

ExpectArity (x : xs) (x -> remainder) = ExpectArity xs remainder |

class ExpectArity xs f => ConsumeArity xs f result | xs f -> result where Source

ConsumeArity ([] *) r r | |

(ConsumeArity xs f r, ExpectArity ((:) * x xs) (x -> f)) => ConsumeArity ((:) * x xs) (x -> f) r |