From b248e6e25e5b58163cc9b897be7eb0b4bf6dbdc6 Mon Sep 17 00:00:00 2001 From: aarne Date: Mon, 21 Jun 2004 08:53:58 +0000 Subject: for release meeting --- src/GF/Compile/Compile.hs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/GF/Compile') diff --git a/src/GF/Compile/Compile.hs b/src/GF/Compile/Compile.hs index fa2e65a3c..78f3a1bb1 100644 --- a/src/GF/Compile/Compile.hs +++ b/src/GF/Compile/Compile.hs @@ -35,6 +35,10 @@ import Arch import Monad +-- environment variable for grammar search path + +gfGrammarPathVar = "GF_LIB_PATH" + -- in batch mode: write code in a file batchCompile f = liftM fst $ compileModule defOpts emptyShellState f @@ -86,9 +90,10 @@ compileModule opts1 st0 file = do let opts = addOptions opts1 opts0 let ps0 = pathListOpts opts let fpath = justInitPath file - let ps = if useFileOpt - then (map (prefixPathName fpath) ps0) - else ps0 + let ps1 = if useFileOpt + then (map (prefixPathName fpath) ps0) + else ps0 + ps <- ioeIO $ extendPathEnv gfGrammarPathVar ps1 let ioeIOIf = if oElem beSilent opts then (const (return ())) else ioeIO ioeIOIf $ putStrLn $ "module search path:" +++ show ps ---- let putp = putPointE opts -- cgit v1.2.3