summaryrefslogtreecommitdiff
path: root/src/GF/Compile
diff options
context:
space:
mode:
authoraarne <unknown>2004-08-11 10:02:26 +0000
committeraarne <unknown>2004-08-11 10:02:26 +0000
commit8bc2cee83156fa923d466a1a9a77816f9049f352 (patch)
treef1ce864e08b2204d48b0dd47f4fcebc5bbc73c9f /src/GF/Compile
parent23db149b9b09dfda3dffc128d94f904cac8f9ff9 (diff)
bug fix in reading files
Diffstat (limited to 'src/GF/Compile')
-rw-r--r--src/GF/Compile/Compile.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/GF/Compile/Compile.hs b/src/GF/Compile/Compile.hs
index 78f3a1bb1..5dd4d3345 100644
--- a/src/GF/Compile/Compile.hs
+++ b/src/GF/Compile/Compile.hs
@@ -88,8 +88,9 @@ compileModule opts1 st0 file = do
opts0 <- ioeIO $ getOptionsFromFile file
let useFileOpt = maybe False (const True) $ getOptVal opts0 pathList
let opts = addOptions opts1 opts0
- let ps0 = pathListOpts opts
let fpath = justInitPath file
+ let ps0 = pathListOpts opts fpath
+
let ps1 = if useFileOpt
then (map (prefixPathName fpath) ps0)
else ps0
@@ -132,8 +133,8 @@ compileEnvShSt st fs = ((0,sgr,cgr),fts) where
notIns i = notElem (prt i) $ map fileBody fs
fts = readFiles st
-pathListOpts :: Options -> [InitPath]
-pathListOpts opts = maybe [""] pFilePaths $ getOptVal opts pathList
+pathListOpts :: Options -> FileName -> [InitPath]
+pathListOpts opts file = maybe [file] pFilePaths $ getOptVal opts pathList
reverseModules (MGrammar ms) = MGrammar $ reverse ms