mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-30 06:52:49 -06:00
added hasLinearization in the Haskell binding
This commit is contained in:
@@ -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 ->
|
||||
|
||||
Reference in New Issue
Block a user