From 7a14507189f6af11a841aea0c9b39491417315f2 Mon Sep 17 00:00:00 2001 From: aarne Date: Sun, 4 Apr 2010 20:46:36 +0000 Subject: in the shell, permit 3-letter lang codes as concrete syntax names --- src/compiler/GF/Command/Commands.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/compiler/GF/Command') 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 -- cgit v1.2.3