summaryrefslogtreecommitdiff
path: root/src-3.0/GFI.hs
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2008-05-30 11:15:33 +0000
committerkrasimir <krasimir@chalmers.se>2008-05-30 11:15:33 +0000
commit8bb0c32a9cf2cbad0375ab5886b7f2be37109477 (patch)
tree2290b07d391a1da4e94ee367b445a6b2f64ca2cd /src-3.0/GFI.hs
parent1172539a9544ed999c565053b79cf6a30ec14de4 (diff)
replace GFCC with PGF in (almost) all places
Diffstat (limited to 'src-3.0/GFI.hs')
-rw-r--r--src-3.0/GFI.hs18
1 files changed, 9 insertions, 9 deletions
diff --git a/src-3.0/GFI.hs b/src-3.0/GFI.hs
index 49d612978..24de6c70c 100644
--- a/src-3.0/GFI.hs
+++ b/src-3.0/GFI.hs
@@ -19,7 +19,7 @@ import Paths_gf
mainGFI :: Options -> [FilePath] -> IO ()
mainGFI opts files = do
putStrLn welcome
- env <- importInEnv emptyMultiGrammar opts files
+ env <- importInEnv emptyPGF opts files
loop (GFEnv emptyGrammar env [] 0)
return ()
@@ -50,7 +50,7 @@ loop gfenv0 = do
loopNewCPU gfenv
-- other special commands, working on GFEnv
- "e":_ -> loopNewCPU $ gfenv {commandenv=env{multigrammar=emptyMultiGrammar}}
+ "e":_ -> loopNewCPU $ gfenv {commandenv=env{multigrammar=emptyPGF}}
"ph":_ -> mapM_ putStrLn (reverse (history gfenv0)) >> loopNewCPU gfenv
"q":_ -> putStrLn "See you." >> return gfenv
@@ -64,13 +64,13 @@ loopNewCPU gfenv = do
putStrLn (show ((cpu' - cputime gfenv) `div` 1000000000) ++ " msec")
loop $ gfenv {cputime = cpu'}
-importInEnv :: MultiGrammar -> Options -> [FilePath] -> IO CommandEnv
-importInEnv mgr0 opts files = do
- mgr1 <- case files of
- [] -> return mgr0
- _ -> importGrammar mgr0 opts files
- let env = CommandEnv mgr1 (allCommands mgr1)
- putStrLn $ unwords $ "\nLanguages:" : languages mgr1
+importInEnv :: PGF -> Options -> [FilePath] -> IO CommandEnv
+importInEnv pgf0 opts files = do
+ pgf1 <- case files of
+ [] -> return pgf0
+ _ -> importGrammar pgf0 opts files
+ let env = CommandEnv pgf1 (allCommands pgf1)
+ putStrLn $ unwords $ "\nLanguages:" : languages pgf1
return env
welcome = unlines [