summaryrefslogtreecommitdiff
path: root/src/GF/Compile
diff options
context:
space:
mode:
authorkrasimir <krasimir@chalmers.se>2008-04-22 12:12:29 +0000
committerkrasimir <krasimir@chalmers.se>2008-04-22 12:12:29 +0000
commit375754e1064f7c64e3806fb802675c80aff1023a (patch)
tree0ee93c7385326f97282f94f77440dc3eb0ab0511 /src/GF/Compile
parentfc111c1a7910ab4a2a1bf40c0473bbaacadedd61 (diff)
move gfLibraryPath and gfGrammarPath to UseIO. Now they are accessible and there is only one place to change if you want to use different envVar
Diffstat (limited to 'src/GF/Compile')
-rw-r--r--src/GF/Compile/Compile.hs7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/GF/Compile/Compile.hs b/src/GF/Compile/Compile.hs
index 58fc91269..422df0fd5 100644
--- a/src/GF/Compile/Compile.hs
+++ b/src/GF/Compile/Compile.hs
@@ -60,9 +60,6 @@ import Control.Monad
import System.Directory
import System.FilePath
--- | environment variable for grammar search path
-gfGrammarPathVar = "GF_GRAMMAR_PATH"
-
-- | in batch mode: write code in a file
batchCompile f = liftM fst $ compileModule defOpts emptyShellState f
where
@@ -115,7 +112,7 @@ compileModule opts1 st0 file = do
let ps1 = if (useFileOpt && not useLineOpt)
then (ps0 ++ map (combine fpath) ps0)
else ps0
- ps <- ioeIO $ extendPathEnv gfLibraryPath gfGrammarPathVar ps1
+ ps <- ioeIO $ extendPathEnv ps1
let ioeIOIf = if oElem beVerbose opts then ioeIO else (const (return ()))
ioeIOIf $ putStrLn $ "module search path:" +++ show ps ----
let st = st0 --- if useFileOpt then emptyShellState else st0
@@ -396,7 +393,7 @@ getGFEFiles opts1 file = useIOE [] $ do
let ps1 = if (useFileOpt && not useLineOpt)
then (map (combine fpath) ps0)
else ps0
- ps <- ioeIO $ extendPathEnv gfLibraryPath gfGrammarPathVar ps1
+ ps <- ioeIO $ extendPathEnv ps1
let file' = if useFileOpt then takeFileName file else file -- to find file itself
files <- getAllFiles opts ps [] file'
efiles <- ioeIO $ filterM doesFileExist [replaceExtension f "gfe" | f <- files]