summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKrasimir Angelov <kr.angelov@gmail.com>2018-04-12 15:12:36 +0200
committerKrasimir Angelov <kr.angelov@gmail.com>2018-04-12 15:12:36 +0200
commit2036ffe06db7df5fb39543a25396a04384d8aba3 (patch)
tree32fff2b290f1f607d217dc5d2087fb5c09468aab /src
parent9a6b3b4a1f84f4071b2782ad876d4e8f9134da34 (diff)
bugfix in the Haskell binding
Diffstat (limited to 'src')
-rw-r--r--src/runtime/haskell-bind/PGF2.hsc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/haskell-bind/PGF2.hsc b/src/runtime/haskell-bind/PGF2.hsc
index 409283981..fb3672c0f 100644
--- a/src/runtime/haskell-bind/PGF2.hsc
+++ b/src/runtime/haskell-bind/PGF2.hsc
@@ -542,7 +542,7 @@ parseWithHeuristics :: Concr -- ^ the language with which we parse
-- If a literal has been recognized then the output should
-- be Just (expr,probability,end_offset)
-> ParseOutput
-parseWithHeuristics lang (Type ctype _) sent heuristic callbacks =
+parseWithHeuristics lang (Type ctype touchType) sent heuristic callbacks =
unsafePerformIO $
do exprPl <- gu_new_pool
parsePl <- gu_new_pool
@@ -550,6 +550,7 @@ parseWithHeuristics lang (Type ctype _) sent heuristic callbacks =
sent <- newUtf8CString sent parsePl
callbacks_map <- mkCallbacksMap (concr lang) callbacks parsePl
enum <- pgf_parse_with_heuristics (concr lang) ctype sent heuristic callbacks_map exn parsePl exprPl
+ touchType
failed <- gu_exn_is_raised exn
if failed
then do is_parse_error <- gu_exn_caught exn gu_exn_type_PgfParseError