ADPfusion-0.6.0.0: Efficient, high-level dynamic programming.

Safe HaskellNone
LanguageHaskell2010

ADP.Fusion.Core.SynVar.Backtrack

Description

Wrap forward tables in such a way as to allow backtracking via algebras.

Synopsis

Documentation

class GenBacktrackTable t (mF :: * -> *) (mB :: * -> *) where Source #

TODO this should go into ADP.Fusion.Table.Backtrack, more than just tabulated syntactic vars are going to use it.

NOTE You probably need to give the monad morphism between mF and mB so as to be able to extract forward results in the backtracking phase.

Associated Types

data Backtrack t (mF :: * -> *) (mB :: * -> *) :: * Source #

type BacktrackIndex t :: * Source #

Methods

toBacktrack :: t -> (forall a. mF a -> mB a) -> Backtrack t mF mB Source #

Instances
GenBacktrackTable (TwIRec mF c i x) mF mB Source # 
Instance details

Defined in ADP.Fusion.Core.SynVar.Recursive.Type

Associated Types

data Backtrack (TwIRec mF c i x) mF mB :: Type Source #

type BacktrackIndex (TwIRec mF c i x) :: Type Source #

Methods

toBacktrack :: TwIRec mF c i x -> (forall a. mF a -> mB a) -> Backtrack (TwIRec mF c i x) mF mB Source #

GenBacktrackTable (TwITbl b s mF arr c i x) mF mB Source # 
Instance details

Defined in ADP.Fusion.Core.SynVar.Array.Type

Associated Types

data Backtrack (TwITbl b s mF arr c i x) mF mB :: Type Source #

type BacktrackIndex (TwITbl b s mF arr c i x) :: Type Source #

Methods

toBacktrack :: TwITbl b s mF arr c i x -> (forall a. mF a -> mB a) -> Backtrack (TwITbl b s mF arr c i x) mF mB Source #