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

Parsley.Internal.Frontend.Compiler

Description

Exposes compile which is used to detect recursion, let-bindings and compile them into another representation with a code generation function.

Since: 1.0.0.0

Synopsis

Documentation

compile Source #

Arguments

:: forall compiled a. Trace 
=> Parser a

The parser to compile.

-> (forall x. Maybe (MVar x) -> Fix Combinator x -> Set SomeΣVar -> IMVar -> compiled x)

How to generate a compiled value with the distilled information.

-> (compiled a, DMap MVar compiled)

The compiled top-level and all of the bindings.

Given a user's parser, this will analyse it, extract bindings and then compile them with a given function provided with the information that has been distilled about each binding. Returns all the prepared bindings along with the top-level definition.

Since: 1.0.0.0