Safe Haskell | None |
---|---|
Language | Haskell2010 |
Wrap forward tables in such a way as to allow backtracking via algebras.
- class GenBacktrackTable t mF mB r where
- data Backtrack t mF mB r :: *
- type BacktrackIndex t :: *
- toBacktrack :: t -> (forall a. mF a -> mB a) -> (BacktrackIndex t -> BacktrackIndex t -> mB [r]) -> Backtrack t mF mB r
Documentation
class GenBacktrackTable t mF mB r 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.
data Backtrack t mF mB r :: * Source
type BacktrackIndex t :: * Source
toBacktrack :: t -> (forall a. mF a -> mB a) -> (BacktrackIndex t -> BacktrackIndex t -> mB [r]) -> Backtrack t mF mB r Source
GenBacktrackTable (IRec mF i x) mF mB r | |
GenBacktrackTable (ITbl mF arr i x) mF mB r |