mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-04 16:52:50 -06:00
bugfix for hasLinearization in the Haskell binding
This commit is contained in:
@@ -580,8 +580,9 @@ parseWithOracle lang cat sent (predict,complete,literal) =
|
||||
-- | Returns True if there is a linearization defined for that function in that language
|
||||
hasLinearization :: Concr -> Fun -> Bool
|
||||
hasLinearization lang id = unsafePerformIO $
|
||||
withGuPool $ \pl ->
|
||||
newUtf8CString id pl >>= pgf_has_linearization (concr lang)
|
||||
withGuPool $ \pl -> do
|
||||
res <- newUtf8CString id pl >>= pgf_has_linearization (concr lang)
|
||||
return (res /= 0)
|
||||
|
||||
-- | Linearizes an expression as a string in the language
|
||||
linearize :: Concr -> Expr -> String
|
||||
|
||||
Reference in New Issue
Block a user