summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Command
diff options
context:
space:
mode:
authoraarne <aarne@chalmers.se>2010-04-04 20:46:36 +0000
committeraarne <aarne@chalmers.se>2010-04-04 20:46:36 +0000
commit7a14507189f6af11a841aea0c9b39491417315f2 (patch)
tree252a5445f45375653ffac3d20ef0eddefaf17352 /src/compiler/GF/Command
parent95d4adac99421bddf3a2a3a84739902a1e2ce105 (diff)
in the shell, permit 3-letter lang codes as concrete syntax names
Diffstat (limited to 'src/compiler/GF/Command')
-rw-r--r--src/compiler/GF/Command/Commands.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/GF/Command/Commands.hs b/src/compiler/GF/Command/Commands.hs
index 6723c4b8f..51f1c1426 100644
--- a/src/compiler/GF/Command/Commands.hs
+++ b/src/compiler/GF/Command/Commands.hs
@@ -924,7 +924,12 @@ allCommands cod env@(pgf, mos) = Map.fromList [
optLangs opts = case valStrOpts "lang" "" opts of
"" -> languages pgf
- lang -> map mkCId (chunks ',' lang)
+ lang -> map completeLang (chunks ',' lang)
+ completeLang la = let cla = (mkCId la) in
+ if elem cla (languages pgf)
+ then cla
+ else (mkCId (showCId (abstractName pgf) ++ la))
+
optLang opts = head $ optLangs opts ++ [wildCId]
optOpenTypes opts = case valStrOpts "openclass" "" opts of