- liftGrammar :: forall phi t r rr. (FoldFam phi, LiftFam phi, Token t) => GLAnyExtendedContextFreeGrammar phi t r rr -> Name -> Q Type -> Q [Dec]
- unfoldAndLiftGrammar :: forall phi t r rr. (FoldFam phi, LiftFam phi, Token t) => GLAnyExtendedContextFreeGrammar phi t r rr -> Name -> Q Type -> Q [Dec]
Documentation
liftGrammar :: forall phi t r rr. (FoldFam phi, LiftFam phi, Token t) => GLAnyExtendedContextFreeGrammar phi t r rr -> Name -> Q Type -> Q [Dec]Source
Lift a given grammar to Template Haskell
unfoldAndLiftGrammar :: forall phi t r rr. (FoldFam phi, LiftFam phi, Token t) => GLAnyExtendedContextFreeGrammar phi t r rr -> Name -> Q Type -> Q [Dec]Source
Lift a given grammar to Template Haskell and replace recursion and loops with
infinite-tree style recursive calls to the grammar itself. This allows GHC to do
a much better optimization (x20 speed-ups in one realistic test, compared with
result of liftGrammar
).