| License | BSD-3-Clause | 
|---|---|
| Maintainer | Jamie Willis | 
| Stability | experimental | 
| Safe Haskell | Safe-Inferred | 
| Language | Haskell2010 | 
Parsley.Internal.Backend.Machine.Types.Base
Description
This module contains the core types of components that make up the underlying machinery for compiled code.
Since: 1.4.0.0
Documentation
type family Func (rs :: [Type]) s o a x where ... Source #
A Func is a Subroutine# augmented with extra arguments with which to handle over
the required free-registers of the parser. These are registers that are not created
by the parser, but are used to execute it.
Since: 1.4.0.0
Equations
| Func '[] s o a x = Subroutine# s o a x | |
| Func (r ': rs) s o a x = STRef s r -> Func rs s o a x | 
type Subroutine# s o a x Source #
Arguments
| = Cont# s o a x | What to do when this parser returns  | 
| -> Handler# s o a | How to handle failure within the call  | 
| -> Pos | The current position  | 
| -> DynRep o | The input on entry to the call  | 
| -> ST s (Maybe a) | 
Subroutine# represents top-level parsers, which require a return continuation,
input, an error handler in order to produce (or contribute to) a result of type a.
Since: 1.4.0.0
Arguments
| = x | The value to be returned to the caller  | 
| -> Pos | The current position  | 
| -> DynRep o | The new input after the call is executed  | 
| -> ST s (Maybe a) | 
Cont# represents return continuation from recursive parsers. They
feed back their result x back to the caller as well as the updated input.
Since: 1.4.0.0
Handler# represents the functions that handle failure within a
parser. For most of their life, handlers are represented as
StaHandler,
but Handler# is used at the boundaries, such as for recursion.
Since: 1.4.0.0