gll-0.4.1.0: GLL parser with simple combinator interface
Safe HaskellSafe-Inferred
LanguageHaskell2010

GLL.Combinators.Memoisation

Synopsis

Documentation

type MemoTable a = IntMap (IntMap a) Source #

A MemoTable maps left-extent l to right-extent r to some results a indicating the the substring ranging from l to r is derived with parse result a.

type MemoRef a = IORef (MemoTable a) Source #

An impure reference to a MemoTable.

memInsert :: (Int, Int) -> a -> MemoTable a -> MemoTable a Source #

memClear :: MemoRef a -> IO () Source #

Clears the MemoTable to which the given reference refers.

newMemoTable :: MemoRef a Source #

Create a reference to a fresh MemoTable.