From 632aab83c3111d198f701de9e72878aa0ceb7015 Mon Sep 17 00:00:00 2001 From: hallgren Date: Fri, 27 Feb 2015 16:42:09 +0000 Subject: 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. --- src/compiler/GF/Command/Importing.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/compiler/GF/Command') 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 -- cgit v1.2.3