From 86c54232752d14069cbb9b3089474d0299f9a20c Mon Sep 17 00:00:00 2001 From: krasimir Date: Wed, 11 May 2016 11:10:22 +0000 Subject: 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 --- src/server/PGFService.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/server') diff --git a/src/server/PGFService.hs b/src/server/PGFService.hs index 08090f309..2d0154e4c 100644 --- a/src/server/PGFService.hs +++ b/src/server/PGFService.hs @@ -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) = -- cgit v1.2.3