summaryrefslogtreecommitdiff
path: root/src/PGF/Data.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/PGF/Data.hs')
-rw-r--r--src/PGF/Data.hs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/PGF/Data.hs b/src/PGF/Data.hs
index 6895bd335..50e11f289 100644
--- a/src/PGF/Data.hs
+++ b/src/PGF/Data.hs
@@ -78,3 +78,18 @@ emptyPGF = PGF {
abstract = error "empty grammar, no abstract",
concretes = Map.empty
}
+
+-- | This is just a 'CId' with the language name.
+-- A language name is the identifier that you write in the
+-- top concrete or abstract module in GF after the
+-- concrete/abstract keyword. Example:
+--
+-- > abstract Lang = ...
+-- > concrete LangEng of Lang = ...
+type Language = CId
+
+readLanguage :: String -> Maybe Language
+readLanguage = readCId
+
+showLanguage :: Language -> String
+showLanguage = prCId