summaryrefslogtreecommitdiff
path: root/src/GF/Compile/Compile.hs
diff options
context:
space:
mode:
authoraarne <unknown>2004-03-24 15:31:38 +0000
committeraarne <unknown>2004-03-24 15:31:38 +0000
commit2433403b6247022ac56133ca935307868fcef6b9 (patch)
treea53994e4d7dd1a253171c4d78f13ef8ffe3a0ee4 /src/GF/Compile/Compile.hs
parentdc71ffcf5bae1f2b91467de273c71e7c3294acb3 (diff)
Making cf2gf to work...
Diffstat (limited to 'src/GF/Compile/Compile.hs')
-rw-r--r--src/GF/Compile/Compile.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/GF/Compile/Compile.hs b/src/GF/Compile/Compile.hs
index 9d80f6a05..e6936809c 100644
--- a/src/GF/Compile/Compile.hs
+++ b/src/GF/Compile/Compile.hs
@@ -55,10 +55,13 @@ batchCompileOld f = compileOld defOpts f
compileModule :: Options -> ShellState -> FilePath ->
IOE (GFC.CanonGrammar, (SourceGrammar,[(FilePath,ModTime)]))
-compileModule opts st0 file | oElem showOld opts = do
+
+compileModule opts st0 file | oElem showOld opts || fileSuffix file == "cf" = do
let putp = putPointE opts
let path = [] ----
- grammar1 <- putp ("- parsing old gf" +++ file) $ getOldGrammar opts file
+ grammar1 <- if fileSuffix file == "cf"
+ then putp ("- parsing cf" +++ file) $ getCFGrammar opts file
+ else putp ("- parsing old gf" +++ file) $ getOldGrammar opts file
let mods = modules grammar1
let env = compileEnvShSt st0 []
(_,sgr,cgr) <- foldM (comp putp path) env mods