summaryrefslogtreecommitdiff
path: root/src/GF/Compile/Compile.hs
diff options
context:
space:
mode:
authoraarne <aarne@cs.chalmers.se>2007-09-17 06:58:41 +0000
committeraarne <aarne@cs.chalmers.se>2007-09-17 06:58:41 +0000
commitc27087d14d456e174335c7b2eea15100054ab57f (patch)
treeb2a619af552c156d2d63e19b86dda459b343c0ce /src/GF/Compile/Compile.hs
parent133b716338db3c61d28556b7c8fd2280dd4ec4d3 (diff)
bud fix in reading gfc without gfr
Diffstat (limited to 'src/GF/Compile/Compile.hs')
-rw-r--r--src/GF/Compile/Compile.hs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/GF/Compile/Compile.hs b/src/GF/Compile/Compile.hs
index dd806b646..00b89ec59 100644
--- a/src/GF/Compile/Compile.hs
+++ b/src/GF/Compile/Compile.hs
@@ -215,9 +215,13 @@ compileOne opts env@((_,srcgr,cancgr0,eenv),_) file = do
--- hack fix to a bug in ReadFiles with reused concrete
- b <- ioeIO $ doesFileExist file
- if not b
- then compileOne opts env $ gfcFile $ unsuffixFile file
+ let modu = unsuffixFile file
+ b1 <- ioeIO $ doesFileExist file
+ b2 <- ioeIO $ doesFileExist $ gfrFile modu
+ if not b1
+ then if b2
+ then compileOne opts env $ gfrFile $ modu
+ else compileOne opts env $ gfcFile $ modu
else do
sm0 <- putpOpt ("- parsing" +++ file) ("- compiling" +++ file ++ "... ") $