on master help sign in
Minor CG changes

remove 'replace' calls, and be more careful with --nocoverage

commit758d56aae11c43f1782c41fc0517746f7d34a893 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateSun 18 Nov 2012, 10:28 (14 years ago) parenteea2d4a
2 files changed+7−2
src/IRTS/Compiler.hs+3 src/Idris/ElabDecls.hs+4−2
src/IRTS/Compiler.hs+3
@@ -144,6 +144,9 @@ instance ToIR (TT Name) where
144144 = doForeign env args
145145 | (P _ (UN "unsafePerformIO") _, [_, arg]) <- unApply tm
146146 = ir' env arg
147+ -- TMP HACK - until we get inlining.
148+ | (P _ (UN "replace") _, [_, _, _, _, _, arg]) <- unApply tm
149+ = ir' env arg
147150 | (P _ (UN "lazy") _, [_, arg]) <- unApply tm
148151 = do arg' <- ir' env arg
149152 return $ LLazyExp arg'
src/Idris/ElabDecls.hs+4−2
@@ -357,7 +357,9 @@ elabClauses info fc opts n_in cs = let n = liftname info n_in in
357357 iputStrLn $ show fc ++
358358 ":warning - Unreachable case: " ++
359359 show (delab ist x)) xs
360− tree' <- tclift $ simpleCase tcase pcover RunTime fc pdef'
360+ let knowncovering = pcover && cov
361+
362+ tree' <- tclift $ simpleCase tcase knowncovering RunTime fc pdef'
361363 logLvl 3 (show tree)
362364 logLvl 3 $ "Optimised: " ++ show tree'
363365 ctxt <- getContext
@@ -365,7 +367,7 @@ elabClauses info fc opts n_in cs = let n = liftname info n_in in
365367 put (ist { idris_patdefs = addDef n pdef' (idris_patdefs ist) })
366368 case lookupTy (namespace info) n ctxt of
367369 [ty] -> do updateContext (addCasedef n (inlinable opts)
368− tcase pcover pats
370+ tcase knowncovering pats
369371 pdef pdef' ty)
370372 addIBC (IBCDef n)
371373 setTotality n tot