summaryrefslogtreecommitdiff
path: root/src/runtime/haskell-bind/PGF2.hsc
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/haskell-bind/PGF2.hsc')
-rw-r--r--src/runtime/haskell-bind/PGF2.hsc7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/runtime/haskell-bind/PGF2.hsc b/src/runtime/haskell-bind/PGF2.hsc
index 20ffc11c4..64f849e56 100644
--- a/src/runtime/haskell-bind/PGF2.hsc
+++ b/src/runtime/haskell-bind/PGF2.hsc
@@ -17,7 +17,8 @@ module PGF2 (-- * CId
-- * PGF
PGF,readPGF,AbsName,abstractName,startCat,
-- * Concrete syntax
- ConcName,Concr,languages,parse,parseWithHeuristics,linearize,alignWords,
+ ConcName,Concr,languages,parse,parseWithHeuristics,
+ hasLinearization,linearize,alignWords,
-- * Types
Type(..), Hypo, functionType,
-- * Trees
@@ -409,6 +410,10 @@ mkCallbacksMap concr callbacks pool = do
predict_callback _ _ _ _ = return nullPtr
+hasLinearization :: Concr -> Fun -> Bool
+hasLinearization lang id = unsafePerformIO $
+ withCString id (pgf_has_linearization (concr lang))
+
linearize :: Concr -> Expr -> String
linearize lang e = unsafePerformIO $
withGuPool $ \pl ->