summaryrefslogtreecommitdiff
path: root/src/compiler/GF/Command
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/GF/Command')
-rw-r--r--src/compiler/GF/Command/Abstract.hs3
-rw-r--r--src/compiler/GF/Command/Commands.hs15
-rw-r--r--src/compiler/GF/Command/Importing.hs2
-rw-r--r--src/compiler/GF/Command/Interpreter.hs4
-rw-r--r--src/compiler/GF/Command/Parse.hs3
5 files changed, 11 insertions, 16 deletions
diff --git a/src/compiler/GF/Command/Abstract.hs b/src/compiler/GF/Command/Abstract.hs
index 5469f12ac..8b7b824f0 100644
--- a/src/compiler/GF/Command/Abstract.hs
+++ b/src/compiler/GF/Command/Abstract.hs
@@ -1,7 +1,6 @@
module GF.Command.Abstract where
-import PGF.CId(CId,mkCId)
-import PGF.Data(Expr)
+import PGF(CId,mkCId,Expr)
type Ident = String
diff --git a/src/compiler/GF/Command/Commands.hs b/src/compiler/GF/Command/Commands.hs
index 8a19d2729..a05b3cf20 100644
--- a/src/compiler/GF/Command/Commands.hs
+++ b/src/compiler/GF/Command/Commands.hs
@@ -14,13 +14,12 @@ import Prelude hiding (putStrLn)
import PGF
-import PGF.VisualizeTree(getDepLabels)
import PGF.Macros(lookStartCat,functionsToCat,lookValCat,restrictPGF,hasLin)
import PGF.Data(abstract,funs,cats,Literal(LStr),Expr(EFun,ELit)) ----
-import PGF.Morphology(isInMorpho,morphoKnown)
+--import PGF.Morphology(isInMorpho,morphoKnown)
import PGF.Printer(ppFun,ppCat)
-import PGF.Probabilistic(rankTreesByProbs,probTree,setProbabilities)
-import PGF.Generate (generateRandomFrom) ----
+--import PGF.Probabilistic(rankTreesByProbs,probTree,setProbabilities)
+--import PGF.Generate (generateRandomFrom) ----
import PGF.Tree (Tree(Fun), expr2tree, tree2expr)
import PGF.Optimize(optimizePGF)
@@ -30,7 +29,7 @@ import GF.Compile.ExampleBased
import GF.Infra.Option (noOptions, readOutputFormat, outputFormatsExpl)
import GF.Infra.UseIO(writeUTF8File)
import GF.Infra.SIO
-import GF.Data.ErrM ----
+--import GF.Data.ErrM ----
import GF.Command.Abstract
import GF.Command.Messages
import GF.Text.Lexing
@@ -43,13 +42,13 @@ import GF.Command.TreeOperations ---- temporary place for typecheck and compute
import GF.Data.Operations
import Data.Binary (encodeFile)
-import Data.List
+import Data.List(intersperse,nub)
import Data.Maybe
import qualified Data.Map as Map
--import System.Cmd(system) -- use GF.Infra.UseIO.restricedSystem instead!
import Text.PrettyPrint
import Data.List (sort)
-import Debug.Trace
+--import Debug.Trace
--import System.Random (newStdGen) ----
@@ -940,7 +939,7 @@ allCommands = Map.fromList [
let outp = valStrOpts "output" "dot" opts
mlab <- case file of
"" -> return Nothing
- _ -> restricted (readFile file) >>= return . Just . getDepLabels . lines
+ _ -> (Just . getDepLabels . lines) `fmap` restricted (readFile file)
let lang = optLang pgf opts
let grphs = unlines $ map (graphvizDependencyTree outp debug mlab Nothing pgf lang) es
if isFlag "view" opts || isFlag "format" opts then do
diff --git a/src/compiler/GF/Command/Importing.hs b/src/compiler/GF/Command/Importing.hs
index ce06156e4..4697e8b64 100644
--- a/src/compiler/GF/Command/Importing.hs
+++ b/src/compiler/GF/Command/Importing.hs
@@ -12,7 +12,7 @@ import GF.Infra.UseIO
import GF.Infra.Option
import GF.Data.ErrM
-import Data.List (nubBy)
+--import Data.List (nubBy)
import System.FilePath
-- import a grammar in an environment where it extends an existing grammar
diff --git a/src/compiler/GF/Command/Interpreter.hs b/src/compiler/GF/Command/Interpreter.hs
index 78f243fff..f27ba47da 100644
--- a/src/compiler/GF/Command/Interpreter.hs
+++ b/src/compiler/GF/Command/Interpreter.hs
@@ -13,10 +13,8 @@ import GF.Command.Abstract
import GF.Command.Parse
import PGF
import PGF.Data
-import PGF.Morphology
-import GF.System.Signal
+--import PGF.Morphology
import GF.Infra.SIO
-import GF.Infra.Option
import Text.PrettyPrint
import Control.Monad(when)
diff --git a/src/compiler/GF/Command/Parse.hs b/src/compiler/GF/Command/Parse.hs
index d68a0bcd7..855fdb54e 100644
--- a/src/compiler/GF/Command/Parse.hs
+++ b/src/compiler/GF/Command/Parse.hs
@@ -1,7 +1,6 @@
module GF.Command.Parse(readCommandLine, pCommand) where
-import PGF.CId
-import PGF.Expr
+import PGF
import GF.Command.Abstract
import Data.Char