From 75b03fb624af33c9b90c3f3dccacadf18b442d17 Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 18 Feb 2005 13:53:29 +0000 Subject: working on resource doc and exx, fixing bugs --- src/GF/API/IOGrammar.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/GF/API') diff --git a/src/GF/API/IOGrammar.hs b/src/GF/API/IOGrammar.hs index 85dd3bbd1..6bebba83f 100644 --- a/src/GF/API/IOGrammar.hs +++ b/src/GF/API/IOGrammar.hs @@ -53,11 +53,11 @@ shellStateFromFiles :: Options -> ShellState -> FilePath -> IOE ShellState shellStateFromFiles opts st file = case fileSuffix file of "gfcm" -> do cenv <- compileOne opts (compileEnvShSt st []) file - ioeErr $ updateShellState opts st cenv + ioeErr $ updateShellState opts Nothing st cenv s | elem s ["cf","ebnf"] -> do let osb = addOptions (options [beVerbose]) opts grts <- compileModule osb st file - ioeErr $ updateShellState opts st grts + ioeErr $ updateShellState opts Nothing st grts _ -> do b <- ioeIO $ isOldFile file let opts' = if b then (addOption showOld opts) else opts @@ -66,7 +66,8 @@ shellStateFromFiles opts st file = case fileSuffix file of then addOptions (options [beVerbose]) opts' -- for old no emit else addOptions (options [beVerbose, emitCode]) opts' grts <- compileModule osb st file - ioeErr $ updateShellState opts' st grts + let top = identC $ justModuleName file + ioeErr $ updateShellState opts' (Just top) st grts --- liftM (changeModTimes rts) $ grammar2shellState opts gr getShellStateFromFiles :: Options -> FilePath -> IO ShellState -- cgit v1.2.3