1
0
forked from GitHub/gf-core

the Literals API in Haskell no longer offers the sentence as an argument to the callbacks. It is just as easy to save the sentence in a closure and by doing that we save the repeated round about from C to Haskell strings

This commit is contained in:
krasimir
2016-05-11 11:10:22 +00:00
parent 9abc6aadde
commit 86c5423275
5 changed files with 14 additions and 17 deletions

View File

@@ -173,7 +173,7 @@ cpgfMain qsem command (t,(pgf,pc)) =
--cparse = C.parse concr cat input
cparse = C.parseWithHeuristics concr cat input (-1) callbacks
callbacks = maybe [] cb $ lookup (C.abstractName pgf) C.literalCallbacks
cb fs = [(cat,f pgf (from,concr))|(cat,f)<-fs]
cb fs = [(cat,f pgf (from,concr) input)|(cat,f)<-fs]
{-
-- Caching parse results:
parse' start mlimit ((from,concr),input) =