License | BSD-3-Clause |
---|---|
Maintainer | Jamie Willis |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Exposes the letRec
function, used to provide a recursive group of bindings
for the top level of a parser.
Since: 1.0.0.0
Synopsis
- letRec :: forall key binding s o a b. GCompare key => DMap key (LetBinding o a) -> (forall x. key x -> String) -> (forall x rs. key x -> Binding o a x -> Regs rs -> DMap key (binding s o a) -> Metadata -> Code (Func rs s o a x)) -> (forall x rs. Code (Func rs s o a x) -> Regs rs -> Metadata -> binding s o a x) -> (DMap key (binding s o a) -> Code b) -> Code b
Documentation
:: forall key binding s o a b. GCompare key | |
=> DMap key (LetBinding o a) | The bindings that should form part of the recursive group |
-> (forall x. key x -> String) | A function which can give a name to a key in the map |
-> (forall x rs. key x -> Binding o a x -> Regs rs -> DMap key (binding s o a) -> Metadata -> Code (Func rs s o a x)) | |
-> (forall x rs. Code (Func rs s o a x) -> Regs rs -> Metadata -> binding s o a x) | How a binding - and their free registers - should be converted into code |
-> (DMap key (binding s o a) -> Code b) | How to produce the top-level binding given the compiled bindings, i.e. the |
-> Code b |
Given a collection of bindings, generates a recursive binding group where each is allowed to refer to every other. These are then in scope for the top-level parser.
Since: 1.5.0.0