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:
@@ -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) =
|
||||
|
||||
Reference in New Issue
Block a user