summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Command
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2015-02-27 16:42:09 +0000
committerhallgren <hallgren@chalmers.se>2015-02-27 16:42:09 +0000
commit632aab83c3111d198f701de9e72878aa0ceb7015 (patch)
tree1c893822c882f69ae759ccec3edaa32952e23e16 /src/compiler/GF/Command
parente0bc6308e07edf4302242e434932c9da42c162bd (diff)
GF shell: fixed problems with previous change of the -retain flag
Because the prompt included the name of the abstract syntax, the loading of the PGF was forced even if -retain was used. Even worse, if an error occured while loading the PGF, it was repeated and caught every time the prompt was printed, creating an infite loop. The solution is to not print the name of the abstract syntax when the grammar is imported with -retain, which is the way things were before anyway.
Diffstat (limited to 'src/compiler/GF/Command')
-rw-r--r--src/compiler/GF/Command/Importing.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/compiler/GF/Command/Importing.hs b/src/compiler/GF/Command/Importing.hs
index 4ef966f77..e7b9a076c 100644
--- a/src/compiler/GF/Command/Importing.hs
+++ b/src/compiler/GF/Command/Importing.hs
@@ -44,9 +44,8 @@ ioUnionPGF one two = case msgUnionPGF one two of
(pgf, Just msg) -> putStrLn msg >> return pgf
(pgf,_) -> return pgf
-importSource :: SourceGrammar -> Options -> [FilePath] -> IO SourceGrammar
-importSource src0 opts files = do
- useIOE src0 (fmap (snd.snd) (batchCompile opts files))
+importSource :: Options -> [FilePath] -> IO SourceGrammar
+importSource opts files = fmap (snd.snd) (batchCompile opts files)
-- for different cf formats
importCF opts files get convert = impCF