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.
This commit is contained in:
hallgren
2015-02-27 16:42:09 +00:00
parent e0bc6308e0
commit 632aab83c3
3 changed files with 12 additions and 11 deletions

View File

@@ -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