parsley-core-2.3.0.0: A fast parser combinator library backed by Typed Template Haskell
LicenseBSD-3-Clause
MaintainerJamie Willis
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Parsley.Internal.Backend.Machine.LetRecBuilder

Description

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

Documentation

letRec Source #

Arguments

:: 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 in for the let

-> 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