@@ -271,7 +271,7 @@ eval traceon ctxt ntimes genv tm opts = ev ntimes [] True [] tm where
271271 || (n == sUN "prim__syntactic_eq")
272272 | otherwise = False
273273
274− getCases cd | simpl = cases_totcheck cd
274+ getCases cd | simpl = cases_compiletime cd
275275 | runtime = cases_runtime cd
276276 | otherwise = cases_compiletime cd
277277
@@ -293,7 +293,7 @@ eval traceon ctxt ntimes genv tm opts = ev ntimes [] True [] tm where
293293 [(CaseOp ci _ _ _ _ cd, acc)]
294294 | (acc == Public || acc == Hidden) &&
295295-- || sUN "assert_total" `elem` stk) &&
296− null (fst (cases_totcheck cd)) -> -- unoptimised version
296+ null (fst (cases_compiletime cd)) -> -- unoptimised version
297297 let (ns, tree) = getCases cd in
298298 if blockSimplify ci n stk
299299 then liftM (VP Ref n) (ev ntimes stk top env ty)
@@ -755,9 +755,7 @@ data Def = Function !Type !Term
755755-- [Name] SC -- Run time cae definitions
756756
757757data CaseDefs = CaseDefs {
758− cases_totcheck :: !([Name], SC),
759758 cases_compiletime :: !([Name], SC),
760− cases_inlined :: !([Name], SC),
761759 cases_runtime :: !([Name], SC)
762760 }
763761 deriving Generic
@@ -785,11 +783,8 @@ instance Show Def where
785783 show (Operator ty _ _) = "Operator: " ++ show ty
786784 show (CaseOp (CaseInfo inlc inla inlr) ty atys ps_in ps cd)
787785 = let (ns, sc) = cases_compiletime cd
788− (ns_t, sc_t) = cases_totcheck cd
789786 (ns', sc') = cases_runtime cd in
790787 "Case: " ++ show ty ++ " " ++ show ps ++ "\n" ++
791− "TOTALITY CHECK TIME:\n\n" ++
792− show ns_t ++ " " ++ show sc_t ++ "\n\n" ++
793788 "COMPILE TIME:\n\n" ++
794789 show ns ++ " " ++ show sc ++ "\n\n" ++
795790 "RUN TIME:\n\n" ++
@@ -949,42 +944,37 @@ addCasedef :: Name -> ErasureInfo -> CaseInfo ->
949944 [(Type, Bool)] -> -- argument types, whether canonical
950945 [Int] -> -- inaccessible arguments
951946 [Either Term (Term, Term)] ->
952− [([Name], Term, Term)] -> -- totality
953947 [([Name], Term, Term)] -> -- compile time
954− [([Name], Term, Term)] -> -- inlined
955948 [([Name], Term, Term)] -> -- run time
956949 Type -> Context -> TC Context
957950addCasedef n ei ci@(CaseInfo inline alwaysInline tcdict)
958951 tcase covering reflect asserted argtys inacc
959− ps_in ps_tot ps_inl ps_ct ps_rt ty uctxt
952+ ps_in ps_ct ps_rt ty uctxt
960953 = do let ctxt = definitions uctxt
961954 access = case lookupDefAcc n False uctxt of
962955 [(_, acc)] -> acc
963956 _ -> Public
964− totalityTime <- simpleCase tcase covering reflect CompileTime emptyFC inacc argtys ps_tot ei
965957 compileTime <- simpleCase tcase covering reflect CompileTime emptyFC inacc argtys ps_ct ei
966− inlined <- simpleCase tcase covering reflect CompileTime emptyFC inacc argtys ps_inl ei
967958 runtime <- simpleCase tcase covering reflect RunTime emptyFC inacc argtys ps_rt ei
968− ctxt' <- case (totalityTime, compileTime, inlined, runtime) of
969− (CaseDef args_tot sc_tot _,
970− CaseDef args_ct sc_ct _,
971− CaseDef args_inl sc_inl _,
959+ ctxt' <- case (compileTime, runtime) of
960+ ( CaseDef args_ct sc_ct _,
972961 CaseDef args_rt sc_rt _) ->
973962 let inl = alwaysInline -- tcdict
974963 inlc = (inl || small n args_ct sc_ct) && (not asserted)
975964 inlr = inl || small n args_rt sc_rt
976− cdef = CaseDefs (args_tot, sc_tot)
977− (args_ct, sc_ct)
978− (args_inl, sc_inl)
965+ cdef = CaseDefs (args_ct, sc_ct)
979966 (args_rt, sc_rt)
980967 op = (CaseOp (ci { case_inlinable = inlc })
981− ty argtys ps_in ps_tot cdef,
968+ ty argtys ps_in ps_ct cdef,
982969 False, access, Unchecked, EmptyMI)
983970 in return $ addDef n op ctxt
984971-- other -> tfail (Msg $ "Error adding case def: " ++ show other)
985972 return uctxt { definitions = ctxt' }
986973
987−-- simplify a definition for totality checking
974+-- simplify a definition by inlining
975+-- (Note: This used to be for totality checking, and now it's actually a
976+-- no-op, but I'm keeping it here because I'll be putting it back with some
977+-- more carefully controlled inlining at some stage. --- EB)
988978simplifyCasedef :: Name -> ErasureInfo -> Context -> TC Context
989979simplifyCasedef n ei uctxt
990980 = do let ctxt = definitions uctxt
@@ -996,8 +986,7 @@ simplifyCasedef n ei uctxt
996986 pdef = map debind ps_in'
997987 CaseDef args sc _ <- simpleCase False (STerm Erased) False CompileTime emptyFC [] atys pdef ei
998988 return $ addDef n (CaseOp ci
999− ty atys ps_in' ps (cd { cases_totcheck = (args, sc),
1000− cases_compiletime = (args, sc) }),
989+ ty atys ps_in' ps (cd { cases_compiletime = (args, sc) }),
1001990 inj, acc, tot, metainf) ctxt
1002991
1003992 _ -> return ctxt