mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-09 04:59:31 -06:00
added languageCode in the Haskell binding
This commit is contained in:
@@ -54,7 +54,7 @@ module PGF2 (-- * PGF
|
||||
compute,
|
||||
|
||||
-- * Concrete syntax
|
||||
ConcName,Concr,languages,concreteName,
|
||||
ConcName,Concr,languages,concreteName,languageCode,
|
||||
-- ** Linearization
|
||||
linearize,linearizeAll,tabularLinearize,tabularLinearizeAll,bracketedLinearize,
|
||||
FId, LIndex, BracketedString(..), showBracketedString, flattenBracketedString,
|
||||
@@ -159,6 +159,10 @@ languages p =
|
||||
concreteName :: Concr -> ConcName
|
||||
concreteName c = unsafePerformIO (peekUtf8CString =<< pgf_concrete_name (concr c))
|
||||
|
||||
languageCode :: Concr -> String
|
||||
languageCode c = unsafePerformIO (peekUtf8CString =<< pgf_language_code (concr c))
|
||||
|
||||
|
||||
-- | Generates an exhaustive possibly infinite list of
|
||||
-- all abstract syntax expressions of the given type.
|
||||
-- The expressions are ordered by their probability.
|
||||
|
||||
Reference in New Issue
Block a user