@@ -84,7 +84,7 @@ elabClauses info' fc opts n_in cs =
8484 -- no simplification or PE
8585 let (pats_in, cs_full) = unzip cs_elab
8686 let pats_raw = map (simple_lhs (tt_ctxt ist)) pats_in
87− logLvl 3 $ "Elaborated patterns:\n" ++ show pats_raw
87+ logElab 3 $ "Elaborated patterns:\n" ++ show pats_raw
8888
8989 solveDeferred n
9090
@@ -102,7 +102,7 @@ elabClauses info' fc opts n_in cs =
102102 -- If the definition is specialisable, this reduces the
103103 -- RHS
104104 pe_tm <- doPartialEval ist tpats
105− let pats_pe = if petrans
105+ let pats_pe = if petrans
106106 then map (simple_lhs (tt_ctxt ist)) pe_tm
107107 else pats_raw
108108
@@ -111,7 +111,7 @@ elabClauses info' fc opts n_in cs =
111111 -- Look for 'static' names and generate new specialised
112112 -- definitions for them, as well as generating rewrite rules
113113 -- for partially evaluated definitions
114− newrules <- if petrans
114+ newrules <- if petrans
115115 then mapM (\ e -> case e of
116116 Left _ -> return []
117117 Right (l, r) -> elabPE info fc n r) pats_pe
@@ -134,12 +134,12 @@ elabClauses info' fc opts n_in cs =
134134 -- pdef is the compile-time pattern definition.
135135 -- This will get further inlined to help with totality checking.
136136 let pdef = map (\(ns, lhs, rhs) -> (map fst ns, lhs, rhs)) $ map debind pats_raw
137− -- pdef_pe is the one which will get further optimised
137+ -- pdef_pe is the one which will get further optimised
138138 -- for run-time, and, partially evaluated
139139 let pdef_pe = map debind pats_transformed
140140
141− logLvl 5 $ "Initial typechecked patterns:\n" ++ show pats_raw
142− logLvl 5 $ "Initial typechecked pattern def:\n" ++ show pdef
141+ logElab 5 $ "Initial typechecked patterns:\n" ++ show pats_raw
142+ logElab 5 $ "Initial typechecked pattern def:\n" ++ show pdef
143143
144144 -- NOTE: Need to store original definition so that proofs which
145145 -- rely on its structure aren't affected by any changes to the
@@ -152,10 +152,10 @@ elabClauses info' fc opts n_in cs =
152152 numArgs <- tclift $ sameLength pdef
153153
154154 case specNames opts of
155− Just _ ->
156− do logLvl 3 $ "Partially evaluated:\n" ++ show pats_pe
155+ Just _ ->
156+ do logElab 3 $ "Partially evaluated:\n" ++ show pats_pe
157157 _ -> return ()
158− logLvl 3 $ "Transformed:\n" ++ show pats_transformed
158+ logElab 3 $ "Transformed:\n" ++ show pats_transformed
159159
160160 erInfo <- getErasureInfo <$> getIState
161161 tree@(CaseDef scargs sc _) <- tclift $
@@ -167,7 +167,7 @@ elabClauses info' fc opts n_in cs =
167167 -- missing <- genMissing n scargs sc
168168 missing' <- filterM (checkPossible info fc True n) missing
169169 let clhs = map getLHS pdef
170− logLvl 2 $ "Must be unreachable:\n" ++
170+ logElab 2 $ "Must be unreachable:\n" ++
171171 showSep "\n" (map showTmImpls missing') ++
172172 "\nAgainst: " ++
173173 showSep "\n" (map (\t -> showTmImpls (delab ist t)) (map getLHS pdef))
@@ -185,12 +185,12 @@ elabClauses info' fc opts n_in cs =
185185 pdef_in' <- applyOpts $ map (\(ns, lhs, rhs) -> (map fst ns, lhs, rhs)) pdef_pe
186186 let pdef' = map (simple_rt (tt_ctxt ist)) pdef_in'
187187
188− logLvl 5 $ "After data structure transformations:\n" ++ show pdef'
188+ logElab 5 $ "After data structure transformations:\n" ++ show pdef'
189189
190190 ist <- getIState
191191 -- let wf = wellFounded ist n sc
192192 let tot | pcover || AssertTotal `elem` opts = Unchecked -- finish later
193− | PEGenerated `elem` opts = Generated
193+ | PEGenerated `elem` opts = Generated
194194 | otherwise = Partial NotCovering -- already know it's not total
195195
196196 -- case lookupCtxt (namespace info) n (idris_flags ist) of
@@ -206,17 +206,17 @@ elabClauses info' fc opts n_in cs =
206206 ":warning - Unreachable case: " ++
207207 show (delab ist x)) xs
208208 let knowncovering = (pcover && cov) || AssertTotal `elem` opts
209− let defaultcase = if knowncovering
209+ let defaultcase = if knowncovering
210210 then STerm Erased
211− else UnmatchedCase $ "*** " ++
212− show fc ++
213− ":unmatched case in " ++ show n ++
211+ else UnmatchedCase $ "*** " ++
212+ show fc ++
213+ ":unmatched case in " ++ show n ++
214214 " ***"
215215
216216 tree' <- tclift $ simpleCase tcase defaultcase reflect
217217 RunTime fc inacc atys pdef' erInfo
218− logLvl 3 $ "Unoptimised " ++ show n ++ ": " ++ show tree
219− logLvl 3 $ "Optimised: " ++ show tree'
218+ logElab 3 $ "Unoptimised " ++ show n ++ ": " ++ show tree
219+ logElab 3 $ "Optimised: " ++ show tree'
220220 ctxt <- getContext
221221 ist <- getIState
222222 let opt = idris_optimisation ist
@@ -224,7 +224,7 @@ elabClauses info' fc opts n_in cs =
224224 (idris_patdefs ist) })
225225 let caseInfo = CaseInfo (inlinable opts) (inlinable opts) (dictionary opts)
226226 case lookupTyExact n ctxt of
227− Just ty ->
227+ Just ty ->
228228 do ctxt' <- do ctxt <- getContext
229229 tclift $
230230 addCasedef n erInfo caseInfo
@@ -242,7 +242,7 @@ elabClauses info' fc opts n_in cs =
242242 setContext ctxt'
243243 addIBC (IBCDef n)
244244 setTotality n tot
245− when (not reflect && PEGenerated `notElem` opts) $
245+ when (not reflect && PEGenerated `notElem` opts) $
246246 do totcheck (fc, n)
247247 defer_totcheck (fc, n)
248248 when (tot /= Unchecked) $ addIBC (IBCTotal n tot)
@@ -256,7 +256,7 @@ elabClauses info' fc opts n_in cs =
256256 -- let scg = buildSCG i sc scargs
257257 -- add SCG later, when checking totality
258258 let cg = CGInfo scargs' calls [] used [] -- TODO: remove this, not needed anymore
259− logLvl 2 $ "Called names: " ++ show cg
259+ logElab 2 $ "Called names: " ++ show cg
260260 addToCG n cg
261261 addToCalledG n (nub (map fst calls)) -- plus names in type!
262262 addIBC (IBCCG n)
@@ -360,7 +360,7 @@ elabPE info fc caller r =
360360 let undef = case lookupDefExact newnm (tt_ctxt ist) of
361361 Nothing -> True
362362 _ -> False
363− logLvl 5 $ show (newnm, undef, map (concreteArg ist) (snd specapp))
363+ logElab 5 $ show (newnm, undef, map (concreteArg ist) (snd specapp))
364364 idrisCatch
365365 (if (undef && all (concreteArg ist) (snd specapp)) then do
366366 cgns <- getAllNames n
@@ -374,32 +374,32 @@ elabPE info fc caller r =
374374 [Total _] -> 65536
375375 [Productive] -> 16
376376 _ -> 1
377− let opts = [Specialise ((if pe_simple specdecl
378− then map (\x -> (x, Nothing)) cgns'
377+ let opts = [Specialise ((if pe_simple specdecl
378+ then map (\x -> (x, Nothing)) cgns'
379379 else []) ++
380− (n, Just maxred) :
380+ (n, Just maxred) :
381381 mapMaybe (specName (pe_simple specdecl))
382382 (snd specapp))]
383− logLvl 3 $ "Specialising application: " ++ show specapp
383+ logElab 3 $ "Specialising application: " ++ show specapp
384384 ++ " in " ++ show caller ++
385385 " with " ++ show opts
386− logLvl 3 $ "New name: " ++ show newnm
387− logLvl 3 $ "PE definition type : " ++ (show specTy)
386+ logElab 3 $ "New name: " ++ show newnm
387+ logElab 3 $ "PE definition type : " ++ (show specTy)
388388 ++ "\n" ++ show opts
389− logLvl 3 $ "PE definition " ++ show newnm ++ ":\n" ++
389+ logElab 3 $ "PE definition " ++ show newnm ++ ":\n" ++
390390 showSep "\n"
391391 (map (\ (lhs, rhs) ->
392392 (showTmImpls lhs ++ " = " ++
393393 showTmImpls rhs)) (pe_clauses specdecl))
394394
395− logLvl 2 $ show n ++ " transformation rule: " ++
395+ logElab 2 $ show n ++ " transformation rule: " ++
396396 showTmImpls rhs ++ " ==> " ++ showTmImpls lhs
397397
398398 elabType info defaultSyntax emptyDocstring [] fc opts newnm NoFC specTy
399399 let def = map (\(lhs, rhs) ->
400400 let lhs' = mapPT hiddenToPH $ stripUnmatchable ist lhs in
401− PClause fc newnm lhs' [] rhs [])
402− (pe_clauses specdecl)
401+ PClause fc newnm lhs' [] rhs [])
402+ (pe_clauses specdecl)
403403 trans <- elabTransform info fc False rhs lhs
404404 elabClauses info fc (PEGenerated:opts) newnm def
405405 return [trans]
@@ -407,7 +407,7 @@ elabPE info fc caller r =
407407 -- if it doesn't work, just don't specialise. Could happen for lots
408408 -- of valid reasons (e.g. local variables in scope which can't be
409409 -- lifted out).
410− (\e -> do logLvl 3 $ "Couldn't specialise: " ++ (pshow ist e)
410+ (\e -> do logElab 3 $ "Couldn't specialise: " ++ (pshow ist e)
411411 return [])
412412
413413 hiddenToPH (PHidden _) = Placeholder
@@ -450,7 +450,7 @@ elabPE info fc caller r =
450450 -- get the clause of a specialised application
451451 getSpecClause ist (n, args)
452452 = let newnm = sUN ("PE_" ++ show (nsroot n) ++ "_" ++
453− qhash 5381 (showSep "_" (map showArg args))) in
453+ qhash 5381 (showSep "_" (map showArg args))) in
454454 -- UN (show n ++ show (map snd args)) in
455455 (n, newnm, mkPE_TermDecl ist newnm n args)
456456 where showArg (ExplicitS, n) = qshow n
@@ -477,7 +477,7 @@ checkPossible info fc tcgen fname lhs_in
477477 let lhs = addImplPat i lhs_in
478478 -- if the LHS type checks, it is possible
479479 case elaborate ctxt (idris_datatypes i) (sMN 0 "patLHS") infP initEState
480− (erun fc (buildTC i info ELHS [] fname
480+ (erun fc (buildTC i info ELHS [] fname
481481 (allNamesIn lhs_in)
482482 (infTerm lhs))) of
483483 OK (ElabResult lhs' _ _ ctxt' newDecls highlights, _) ->
@@ -570,17 +570,17 @@ elabClause info opts (cnum, PClause fc fname lhs_in_as withs rhs_in_as wherebloc
570570
571571 let lhs = mkLHSapp $ stripLinear i $ stripUnmatchable i $
572572 propagateParams i params norm_ty (allNamesIn lhs_in) (addImplPat i lhs_in)
573−-- let lhs = mkLHSapp $
573+-- let lhs = mkLHSapp $
574574-- propagateParams i params fn_ty (addImplPat i lhs_in)
575− logLvl 10 (show (params, fn_ty) ++ " " ++ showTmImpls (addImplPat i lhs_in))
576− logLvl 5 ("LHS: " ++ show fc ++ " " ++ showTmImpls lhs)
577− logLvl 4 ("Fixed parameters: " ++ show params ++ " from " ++ show lhs_in ++
575+ logElab 10 (show (params, fn_ty) ++ " " ++ showTmImpls (addImplPat i lhs_in))
576+ logElab 5 ("LHS: " ++ show fc ++ " " ++ showTmImpls lhs)
577+ logElab 4 ("Fixed parameters: " ++ show params ++ " from " ++ show lhs_in ++
578578 "\n" ++ show (fn_ty, fn_is))
579579
580580 ((ElabResult lhs' dlhs [] ctxt' newDecls highlights, probs, inj), _) <-
581581 tclift $ elaborate ctxt (idris_datatypes i) (sMN 0 "patLHS") infP initEState
582582 (do res <- errAt "left hand side of " fname Nothing
583− (erun fc (buildTC i info ELHS opts fname
583+ (erun fc (buildTC i info ELHS opts fname
584584 (allNamesIn lhs_in)
585585 (infTerm lhs)))
586586 probs <- get_probs
@@ -589,16 +589,16 @@ elabClause info opts (cnum, PClause fc fname lhs_in_as withs rhs_in_as wherebloc
589589 setContext ctxt'
590590 processTacticDecls info newDecls
591591 sendHighlighting highlights
592−
592+
593593 when inf $ addTyInfConstraints fc (map (\(x,y,_,_,_,_,_) -> (x,y)) probs)
594594
595595 let lhs_tm = orderPats (getInferTerm lhs')
596596 let lhs_ty = getInferType lhs'
597597 let static_names = getStaticNames i lhs_tm
598598
599− logLvl 3 ("Elaborated: " ++ show lhs_tm)
600− logLvl 3 ("Elaborated type: " ++ show lhs_ty)
601− logLvl 5 ("Injective: " ++ show fname ++ " " ++ show inj)
599+ logElab 3 ("Elaborated: " ++ show lhs_tm)
600+ logElab 3 ("Elaborated type: " ++ show lhs_ty)
601+ logElab 5 ("Injective: " ++ show fname ++ " " ++ show inj)
602602
603603 -- If we're inferring metavariables in the type, don't recheck,
604604 -- because we're only doing this to try to work out those metavariables
@@ -615,16 +615,16 @@ elabClause info opts (cnum, PClause fc fname lhs_in_as withs rhs_in_as wherebloc
615615 -- Issue #1615 on the Issue Tracker.
616616 -- https://github.com/idris-lang/Idris-dev/issues/1615
617617 when (not (null borrowed)) $
618− logLvl 5 ("Borrowed names on LHS: " ++ show borrowed)
618+ logElab 5 ("Borrowed names on LHS: " ++ show borrowed)
619619
620− logLvl 3 ("Normalised LHS: " ++ showTmImpls (delabMV i clhs))
620+ logElab 3 ("Normalised LHS: " ++ showTmImpls (delabMV i clhs))
621621
622622 rep <- useREPL
623623 when rep $ do
624624 addInternalApp (fc_fname fc) (fst . fc_start $ fc) (delabMV i clhs) -- TODO: Should use span instead of line and filename?
625625 addIBC (IBCLineApp (fc_fname fc) (fst . fc_start $ fc) (delabMV i clhs))
626626
627− logLvl 5 ("Checked " ++ show clhs ++ "\n" ++ show clhsty)
627+ logElab 5 ("Checked " ++ show clhs ++ "\n" ++ show clhsty)
628628 -- Elaborate where block
629629 ist <- getIState
630630 windex <- getName
@@ -647,16 +647,16 @@ elabClause info opts (cnum, PClause fc fname lhs_in_as withs rhs_in_as wherebloc
647647 -- Elaborate those with a type *before* RHS, those without *after*
648648 let (wbefore, wafter) = sepBlocks wb
649649
650− logLvl 2 $ "Where block:\n " ++ show wbefore ++ "\n" ++ show wafter
650+ logElab 2 $ "Where block:\n " ++ show wbefore ++ "\n" ++ show wafter
651651 mapM_ (rec_elabDecl info EAll winfo) wbefore
652652 -- Now build the RHS, using the type of the LHS as the goal.
653653 i <- getIState -- new implicits from where block
654− logLvl 5 (showTmImpls (expandParams decorate newargs defs (defs \\ decls) rhs_in))
654+ logElab 5 (showTmImpls (expandParams decorate newargs defs (defs \\ decls) rhs_in))
655655 let rhs = addImplBoundInf i (map fst newargs_all) (defs \\ decls)
656656 (expandParams decorate newargs defs (defs \\ decls) rhs_in)
657− logLvl 2 $ "RHS: " ++ show (map fst newargs_all) ++ " " ++ showTmImpls rhs
657+ logElab 2 $ "RHS: " ++ show (map fst newargs_all) ++ " " ++ showTmImpls rhs
658658 ctxt <- getContext -- new context with where block added
659− logLvl 5 "STARTING CHECK"
659+ logElab 5 "STARTING CHECK"
660660 ((rhs', defer, is, probs, ctxt', newDecls, highlights), _) <-
661661 tclift $ elaborate ctxt (idris_datatypes i) (sMN 0 "patRHS") clhsty initEState
662662 (do pbinds ist lhs_tm
@@ -671,7 +671,7 @@ elabClause info opts (cnum, PClause fc fname lhs_in_as withs rhs_in_as wherebloc
671671 (erun fc $ psolve lhs_tm)
672672 tt <- get_term
673673 aux <- getAux
674− let (tm, ds) = runState (collectDeferred (Just fname)
674+ let (tm, ds) = runState (collectDeferred (Just fname)
675675 (map fst $ case_decls aux) ctxt tt) []
676676 probs <- get_probs
677677 return (tm, ds, is, probs, ctxt', newDecls, highlights))
@@ -681,9 +681,9 @@ elabClause info opts (cnum, PClause fc fname lhs_in_as withs rhs_in_as wherebloc
681681
682682 when inf $ addTyInfConstraints fc (map (\(x,y,_,_,_,_,_) -> (x,y)) probs)
683683
684− logLvl 5 "DONE CHECK"
685− logLvl 4 $ "---> " ++ show rhs'
686− when (not (null defer)) $ logLvl 1 $ "DEFERRED " ++
684+ logElab 5 "DONE CHECK"
685+ logElab 4 $ "---> " ++ show rhs'
686+ when (not (null defer)) $ logElab 1 $ "DEFERRED " ++
687687 show (map (\ (n, (_,_,t,_)) -> (n, t)) defer)
688688 def' <- checkDef fc (\n -> Elaborating "deferred type of " n Nothing) defer
689689 let def'' = map (\(n, (i, top, t, ns)) -> (n, (i, top, t, ns, False))) def'
@@ -700,20 +700,20 @@ elabClause info opts (cnum, PClause fc fname lhs_in_as withs rhs_in_as wherebloc
700700 mapM_ (elabCaseBlock winfo opts) is
701701
702702 ctxt <- getContext
703− logLvl 5 $ "Rechecking"
704− logLvl 6 $ " ==> " ++ show (forget rhs')
703+ logElab 5 $ "Rechecking"
704+ logElab 6 $ " ==> " ++ show (forget rhs')
705705
706706 (crhs, crhsty) <- if not inf
707707 then recheckC_borrowing True (PEGenerated `notElem` opts)
708708 borrowed fc id [] rhs'
709709 else return (rhs', clhsty)
710− logLvl 6 $ " ==> " ++ showEnvDbg [] crhsty ++ " against " ++ showEnvDbg [] clhsty
710+ logElab 6 $ " ==> " ++ showEnvDbg [] crhsty ++ " against " ++ showEnvDbg [] clhsty
711711 ctxt <- getContext
712712 let constv = next_tvar ctxt
713713 case LState.runStateT (convertsC ctxt [] crhsty clhsty) (constv, []) of
714714 OK (_, cs) -> when (PEGenerated `notElem` opts) $ do
715− addConstraints fc cs
716− logLvl 6 $ "CONSTRAINTS ADDED: " ++ show cs ++ "\n" ++ show (clhsty, crhsty)
715+ addConstraints fc cs
716+ logElab 6 $ "CONSTRAINTS ADDED: " ++ show cs ++ "\n" ++ show (clhsty, crhsty)
717717 return ()
718718 Error e -> ierror (At fc (CantUnify False (clhsty, Nothing) (crhsty, Nothing) e [] 0))
719719 i <- getIState
@@ -805,14 +805,14 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in pn_in withblock)
805805 [t] -> t
806806 _ -> []
807807 let params = getParamsInType i [] fn_is (normalise ctxt [] fn_ty)
808− let lhs = stripLinear i $ stripUnmatchable i $
809− propagateParams i params fn_ty (allNamesIn lhs_in)
808+ let lhs = stripLinear i $ stripUnmatchable i $
809+ propagateParams i params fn_ty (allNamesIn lhs_in)
810810 (addImplPat i lhs_in)
811− logLvl 2 ("LHS: " ++ show lhs)
811+ logElab 2 ("LHS: " ++ show lhs)
812812 (ElabResult lhs' dlhs [] ctxt' newDecls highlights, _) <-
813813 tclift $ elaborate ctxt (idris_datatypes i) (sMN 0 "patLHS") infP initEState
814814 (errAt "left hand side of with in " fname Nothing
815− (erun fc (buildTC i info ELHS opts fname
815+ (erun fc (buildTC i info ELHS opts fname
816816 (allNamesIn lhs_in)
817817 (infTerm lhs))) )
818818 setContext ctxt'
@@ -823,12 +823,12 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in pn_in withblock)
823823 let lhs_ty = getInferType lhs'
824824 let ret_ty = getRetTy (explicitNames (normalise ctxt [] lhs_ty))
825825 let static_names = getStaticNames i lhs_tm
826− logLvl 5 (show lhs_tm ++ "\n" ++ show static_names)
826+ logElab 5 (show lhs_tm ++ "\n" ++ show static_names)
827827 (clhs, clhsty) <- recheckC fc id [] lhs_tm
828− logLvl 5 ("Checked " ++ show clhs)
828+ logElab 5 ("Checked " ++ show clhs)
829829 let bargs = getPBtys (explicitNames (normalise ctxt [] lhs_tm))
830830 let wval = addImplBound i (map fst bargs) wval_in
831− logLvl 5 ("Checking " ++ showTmImpls wval)
831+ logElab 5 ("Checking " ++ showTmImpls wval)
832832 -- Elaborate wval in this context
833833 ((wval', defer, is, ctxt', newDecls, highlights), _) <-
834834 tclift $ elaborate ctxt (idris_datatypes i) (sMN 0 "withRHS")
@@ -851,11 +851,11 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in pn_in withblock)
851851 let def'' = map (\(n, (i, top, t, ns)) -> (n, (i, top, t, ns, False))) def'
852852 addDeferred def''
853853 mapM_ (elabCaseBlock info opts) is
854− logLvl 5 ("Checked wval " ++ show wval')
854+ logElab 5 ("Checked wval " ++ show wval')
855855 (cwval, cwvalty) <- recheckC fc id [] (getInferTerm wval')
856856 let cwvaltyN = explicitNames (normalise ctxt [] cwvalty)
857857 let cwvalN = explicitNames (normalise ctxt [] cwval)
858− logLvl 3 ("With type " ++ show cwvalty ++ "\nRet type " ++ show ret_ty)
858+ logElab 3 ("With type " ++ show cwvalty ++ "\nRet type " ++ show ret_ty)
859859 -- We're going to assume the with type is not a function shortly,
860860 -- so report an error if it is (you can't match on a function anyway
861861 -- so this doesn't lose anything)
@@ -876,9 +876,9 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in pn_in withblock)
876876 -- Highlight explicit proofs
877877 sendHighlighting $ [(fc, AnnBoundName n False) | (n, fc) <- maybeToList pn_in]
878878
879− logLvl 10 ("With type " ++ show (getRetTy cwvaltyN) ++
879+ logElab 10 ("With type " ++ show (getRetTy cwvaltyN) ++
880880 " depends on " ++ show pdeps ++ " from " ++ show pvars)
881− logLvl 10 ("Pre " ++ show bargs_pre ++ "\nPost " ++ show bargs_post)
881+ logElab 10 ("Pre " ++ show bargs_pre ++ "\nPost " ++ show bargs_post)
882882 windex <- getName
883883 -- build a type declaration for the new function:
884884 -- (ps : Xs) -> (withval : cwvalty) -> (ps' : Xs') -> ret_ty
@@ -886,7 +886,7 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in pn_in withblock)
886886 let wargtype = getRetTy cwvaltyN
887887 let wargname = sMN windex "warg"
888888
889− logLvl 5 ("Abstract over " ++ show wargval ++ " in " ++ show wargtype)
889+ logElab 5 ("Abstract over " ++ show wargval ++ " in " ++ show wargtype)
890890 let wtype = bindTyArgs (flip (Pi Nothing) (TType (UVar 0))) (bargs_pre ++
891891 (wargname, wargtype) :
892892 map (abstract wargname wargval wargtype) bargs_post ++
@@ -896,13 +896,13 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in pn_in withblock)
896896 P Bound wargname Erased, wargval])]
897897 Nothing -> [])
898898 (substTerm wargval (P Bound wargname wargtype) ret_ty)
899− logLvl 3 ("New function type " ++ show wtype)
899+ logElab 3 ("New function type " ++ show wtype)
900900 let wname = SN (WithN windex fname)
901901
902902 let imps = getImps wtype -- add to implicits context
903903 putIState (i { idris_implicits = addDef wname imps (idris_implicits i) })
904904 let statics = getStatics static_names wtype
905− logLvl 5 ("Static positions " ++ show statics)
905+ logElab 5 ("Static positions " ++ show statics)
906906 i <- getIState
907907 putIState (i { idris_statics = addDef wname statics (idris_statics i) })
908908
@@ -919,7 +919,7 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in pn_in withblock)
919919 -- ==> fname' ps wpat [rest], match pats against toplevel for ps
920920 wb <- mapM (mkAuxC mpn wname lhs (map fst bargs_pre) (map fst bargs_post))
921921 withblock
922− logLvl 3 ("with block " ++ show wb)
922+ logElab 3 ("with block " ++ show wb)
923923 -- propagate totality assertion to the new definitions
924924 when (AssertTotal `elem` opts) $ setFlags wname [AssertTotal]
925925 mapM_ (rec_elabDecl info EAll info) wb
@@ -935,7 +935,7 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in pn_in withblock)
935935 [ pimp (sUN "A") Placeholder False
936936 , pimp (sUN "x") Placeholder False
937937 ])])
938− logLvl 5 ("New RHS " ++ showTmImpls rhs)
938+ logElab 5 ("New RHS " ++ showTmImpls rhs)
939939 ctxt <- getContext -- New context with block added
940940 i <- getIState
941941 ((rhs', defer, is, ctxt', newDecls, highlights), _) <-
@@ -955,7 +955,7 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in pn_in withblock)
955955 let def'' = map (\(n, (i, top, t, ns)) -> (n, (i, top, t, ns, False))) def'
956956 addDeferred def''
957957 mapM_ (elabCaseBlock info opts) is
958− logLvl 5 ("Checked RHS " ++ show rhs')
958+ logElab 5 ("Checked RHS " ++ show rhs')
959959 (crhs, crhsty) <- recheckC fc id [] rhs'
960960 return $ (Right (clhs, crhs), lhs)
961961 where
@@ -971,18 +971,18 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in pn_in withblock)
971971 mkAux pn wname toplhs ns ns' (PClause fc n tm_in (w:ws) rhs wheres)
972972 = do i <- getIState
973973 let tm = addImplPat i tm_in
974− logLvl 2 ("Matching " ++ showTmImpls tm ++ " against " ++
974+ logElab 2 ("Matching " ++ showTmImpls tm ++ " against " ++
975975 showTmImpls toplhs)
976976 case matchClause i toplhs tm of
977977 Left (a,b) -> ifail $ show fc ++ ":with clause does not match top level"
978978 Right mvars ->
979− do logLvl 3 ("Match vars : " ++ show mvars)
979+ do logElab 3 ("Match vars : " ++ show mvars)
980980 lhs <- updateLHS n pn wname mvars ns ns' (fullApp tm) w
981981 return $ PClause fc wname lhs ws rhs wheres
982982 mkAux pn wname toplhs ns ns' (PWith fc n tm_in (w:ws) wval pn' withs)
983983 = do i <- getIState
984984 let tm = addImplPat i tm_in
985− logLvl 2 ("Matching " ++ showTmImpls tm ++ " against " ++
985+ logElab 2 ("Matching " ++ showTmImpls tm ++ " against " ++
986986 showTmImpls toplhs)
987987 withs' <- mapM (mkAuxC pn wname toplhs ns ns') withs
988988 case matchClause i toplhs tm of
@@ -1001,7 +1001,7 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in pn_in withblock)
10011001 ns' = map (keepMvar (map fst mvars) fc') ns_in' in
10021002 return $ substMatches mvars $
10031003 PApp fc (PRef fc' [] wname)
1004− (map pexp ns ++ pexp w : (map pexp ns') ++
1004+ (map pexp ns ++ pexp w : (map pexp ns') ++
10051005 case pn of
10061006 Nothing -> []
10071007 Just pnm -> [pexp (PRef fc [] pnm)])