1
0
forked from GitHub/gf-core

for release meeting

This commit is contained in:
aarne
2004-06-21 08:53:58 +00:00
parent a134a1fd65
commit b248e6e25e
5 changed files with 570 additions and 9 deletions

View File

@@ -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