added hasLinearization in the Haskell binding

This commit is contained in:
kr.angelov
2015-01-30 13:05:57 +00:00
parent 340328b8a1
commit 68a2f09590
2 changed files with 9 additions and 1 deletions

View File

@@ -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 ->