diff options
| author | hallgren <hallgren@chalmers.se> | 2014-10-20 15:05:43 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2014-10-20 15:05:43 +0000 |
| commit | 55aebadd5a64eb3f6a566168bbeeeb7cbb4ccb44 (patch) | |
| tree | f47b796fe513256dcb6117f3a1af5c752d4ddbe5 /src/compiler/GF/Interactive.hs | |
| parent | bb1f0f3368f3ee2065b0e5ee74e3c45b0116e8a9 (diff) | |
Remove some dead code
* The following modules are no longer used and have been removed completely:
GF.Compile.Compute.ConcreteLazy
GF.Compile.Compute.ConcreteStrict
GF.Compile.Refresh
* The STM monad has been commented out. It was only used in
GF.Compile.SubExpOpt, where could be replaced with a plain State monad,
since no error handling was needed. One of the functions was hardwired to
the Err monad, but did in fact not use error handling, so it was turned
into a pure function.
* The function errVal has been renamed to fromErr (since it is analogous to
fromMaybe).
* Replaced 'fail' with 'raise' and 'return ()' with 'done' in a few places.
* Some additional old code that was already commented out has been removed.
Diffstat (limited to 'src/compiler/GF/Interactive.hs')
| -rw-r--r-- | src/compiler/GF/Interactive.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/GF/Interactive.hs b/src/compiler/GF/Interactive.hs index 18bee2e49..2af5b092b 100644 --- a/src/compiler/GF/Interactive.hs +++ b/src/compiler/GF/Interactive.hs @@ -8,7 +8,7 @@ import GF.Command.Interpreter(CommandEnv(..),commands,mkCommandEnv,emptyCommandE import GF.Command.Commands(flags,options) import GF.Command.Abstract import GF.Command.Parse(readCommandLine,pCommand) -import GF.Data.Operations (Err(..),chunks,err,raise) +import GF.Data.Operations (Err(..),chunks,err,raise,done) import GF.Grammar hiding (Ident,isPrefixOf) import GF.Grammar.Analyse import GF.Grammar.Parser (runP, pExp) @@ -83,7 +83,7 @@ mainServerGFI opts files = -- | Read end execute commands until it is time to quit loop :: Options -> GFEnv -> IO () -loop opts gfenv = maybe (return ()) (loop opts) =<< readAndExecute1 opts gfenv +loop opts gfenv = maybe done (loop opts) =<< readAndExecute1 opts gfenv -- | Read and execute one command, returning Just an updated environment for -- | the next command, or Nothing when it is time to quit @@ -363,7 +363,7 @@ importInEnv gfenv opts files pgf1 <- importGrammar pgf0 opts' files if (verbAtLeast opts Normal) then putStrLnFlush $ unwords $ "\nLanguages:" : map showCId (languages pgf1) - else return () + else done return $ gfenv { commandenv = mkCommandEnv pgf1 } tryGetLine = do |
