diff options
| author | krasimir <krasimir@chalmers.se> | 2009-09-08 08:40:28 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2009-09-08 08:40:28 +0000 |
| commit | 28a7c4b5c7659dc18166e06e914fb0a81c1c43bc (patch) | |
| tree | 3d4a866f0fe37d8b45230581c44f459d7ac16e3d /src/PGF/Data.hs | |
| parent | 9940c44259fe3ee4501e324b4d1816a50d77fa37 (diff) | |
now the datatype Tree is only internal. All API functions are working with Expr directly. Commands gt, gr, p and rf filter out the output via the typechecker
Diffstat (limited to 'src/PGF/Data.hs')
| -rw-r--r-- | src/PGF/Data.hs | 15 |
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 |
