From 2f89962c442ba6c9d82d19e8e184a136c1f58bc9 Mon Sep 17 00:00:00 2001 From: bjorn Date: Fri, 30 May 2008 15:20:28 +0000 Subject: Refactor GFI to treat command line files and the i command uniformly. Disable CSE by default in GFI. --- src-3.0/GF/Command/Interpreter.hs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src-3.0/GF/Command/Interpreter.hs') diff --git a/src-3.0/GF/Command/Interpreter.hs b/src-3.0/GF/Command/Interpreter.hs index a5da51f7e..fa0de5ec8 100644 --- a/src-3.0/GF/Command/Interpreter.hs +++ b/src-3.0/GF/Command/Interpreter.hs @@ -1,5 +1,6 @@ module GF.Command.Interpreter ( CommandEnv (..), + mkCommandEnv, interpretCommandLine ) where @@ -21,6 +22,9 @@ data CommandEnv = CommandEnv { commands :: Map.Map String CommandInfo } +mkCommandEnv :: PGF -> CommandEnv +mkCommandEnv pgf = CommandEnv pgf (allCommands pgf) + interpretCommandLine :: CommandEnv -> String -> IO () interpretCommandLine env line = case (pCommandLine (myLexer line)) of Ok CEmpty -> return () -- cgit v1.2.3