1
0
forked from GitHub/gf-core

uncurrying performed in CheckGFCC

This commit is contained in:
aarne
2007-10-03 11:49:46 +00:00
parent 156d0e321e
commit 7933d12f06
3 changed files with 55 additions and 42 deletions

View File

@@ -20,19 +20,18 @@ main = do
_ | oElem (iOpt "-make") opts -> do
gr <- batchCompile opts fs
let name = justModuleName (last fs)
let (abs,gc) = mkCanon2gfcc opts name gr
if oElem (iOpt "check") opts then (check gc) else return ()
let (abs,gc0) = mkCanon2gfcc opts name gr
gc <- check gc0
let target = abs ++ ".gfcc"
writeFile target (printTree gc)
writeFile target (printGFCC gc)
putStrLn $ "wrote file " ++ target
_ -> do
mapM_ (batchCompile opts) (map return fs)
putStrLn "Done."
check gc = do
let gfcc = mkGFCC gc
b <- checkGFCC gfcc
check gc0 = do
let gfcc = mkGFCC gc0
(gc,b) <- checkGFCC gfcc
putStrLn $ if b then "OK" else "Corrupted GFCC"
return gc