@@ -51,11 +51,11 @@ elabType info syn doc fc opts n ty' = {- let ty' = piBind (params info) ty_in
51 do checkUndefined fc n
51 do checkUndefined fc n
52 ctxt <- getContext
52 ctxt <- getContext
53 i <- getIState
53 i <- getIState
54− logLvl 3 $ show n ++ " pre-type " ++ showImp True False ty'
54+ logLvl 3 $ show n ++ " pre-type " ++ showImp Nothing True False ty'
55 ty' <- addUsingConstraints syn fc ty'
55 ty' <- addUsingConstraints syn fc ty'
56 ty' <- implicit syn n ty'
56 ty' <- implicit syn n ty'
57 let ty = addImpl i ty'
57 let ty = addImpl i ty'
58− logLvl 2 $ show n ++ " type " ++ showImp True False ty
58+ logLvl 2 $ show n ++ " type " ++ showImp Nothing True False ty
59 ((tyT, defer, is), log) <- tclift $ elaborate ctxt n (TType (UVal 0)) []
59 ((tyT, defer, is), log) <- tclift $ elaborate ctxt n (TType (UVal 0)) []
60 (erun fc (build i info False n ty))
60 (erun fc (build i info False n ty))
61 ds <- checkDef fc defer
61 ds <- checkDef fc defer
@@ -482,7 +482,7 @@ elabCon info syn tn codata (doc, n, t_in, fc)
482 i <- getIState
482 i <- getIState
483 t_in <- implicit syn n (if codata then mkLazy t_in else t_in)
483 t_in <- implicit syn n (if codata then mkLazy t_in else t_in)
484 let t = addImpl i t_in
484 let t = addImpl i t_in
485− logLvl 2 $ show fc ++ ":Constructor " ++ show n ++ " : " ++ showImp True False t
485+ logLvl 2 $ show fc ++ ":Constructor " ++ show n ++ " : " ++ showImp Nothing True False t
486 ((t', defer, is), log) <- tclift $ elaborate ctxt n (TType (UVal 0)) []
486 ((t', defer, is), log) <- tclift $ elaborate ctxt n (TType (UVal 0)) []
487 (erun fc (build i info False n t))
487 (erun fc (build i info False n t))
488 logLvl 2 $ "Rechecking " ++ show t'
488 logLvl 2 $ "Rechecking " ++ show t'
@@ -589,9 +589,9 @@ elabClauses info fc opts n_in cs = let n = liftname info n_in in
589 missing' <- filterM (checkPossible info fc True n) missing
589 missing' <- filterM (checkPossible info fc True n) missing
590 let clhs = map getLHS pdef
590 let clhs = map getLHS pdef
591 logLvl 2 $ "Must be unreachable:\n" ++
591 logLvl 2 $ "Must be unreachable:\n" ++
592− showSep "\n" (map (showImp True False) missing') ++
592+ showSep "\n" (map (showImp Nothing True False) missing') ++
593 "\nAgainst: " ++
593 "\nAgainst: " ++
594− showSep "\n" (map (\t -> showImp True False (delab ist t)) (map getLHS pdef))
594+ showSep "\n" (map (\t -> showImp Nothing True False (delab ist t)) (map getLHS pdef))
595 -- filter out anything in missing' which is
595 -- filter out anything in missing' which is
596 -- matched by any of clhs. This might happen since
596 -- matched by any of clhs. This might happen since
597 -- unification may force a variable to take a
597 -- unification may force a variable to take a
@@ -711,7 +711,7 @@ elabVal info aspat tm_in
711 = do ctxt <- getContext
711 = do ctxt <- getContext
712 i <- getIState
712 i <- getIState
713 let tm = addImpl i tm_in
713 let tm = addImpl i tm_in
714− logLvl 10 (showImp True False tm)
714+ logLvl 10 (showImp Nothing True False tm)
716 -- * ordinary elaboration
716 -- * ordinary elaboration
717 -- * elaboration as a Type
717 -- * elaboration as a Type
@@ -776,7 +776,7 @@ elabClause info tcgen (cnum, PClause fc fname lhs_in withs rhs_in whereblock)
777 let params = getParamsInType i [] fn_is fn_ty
777 let params = getParamsInType i [] fn_is fn_ty
778 let lhs = addImplPat i (propagateParams params (stripLinear i lhs_in))
778 let lhs = addImplPat i (propagateParams params (stripLinear i lhs_in))
779− logLvl 5 ("LHS: " ++ show fc ++ " " ++ showImp True False lhs)
779+ logLvl 5 ("LHS: " ++ show fc ++ " " ++ showImp Nothing True False lhs)
780 logLvl 4 ("Fixed parameters: " ++ show params ++ " from " ++ show (fn_ty, fn_is))
780 logLvl 4 ("Fixed parameters: " ++ show params ++ " from " ++ show (fn_ty, fn_is))
781 ((lhs', dlhs, []), _) <-
781 ((lhs', dlhs, []), _) <-
782 tclift $ elaborate ctxt (MN 0 "patLHS") infP []
782 tclift $ elaborate ctxt (MN 0 "patLHS") infP []
@@ -806,10 +806,10 @@ elabClause info tcgen (cnum, PClause fc fname lhs_in withs rhs_in whereblock)
806 mapM_ (elabDecl' EAll info) wbefore
806 mapM_ (elabDecl' EAll info) wbefore
807 -- Now build the RHS, using the type of the LHS as the goal.
807 -- Now build the RHS, using the type of the LHS as the goal.
808 i <- getIState -- new implicits from where block
808 i <- getIState -- new implicits from where block
809− logLvl 5 (showImp True False (expandParams decorate newargs defs (defs \\ decls) rhs_in))
809+ logLvl 5 (showImp Nothing True False (expandParams decorate newargs defs (defs \\ decls) rhs_in))
810 let rhs = addImplBoundInf i (map fst newargs) (defs \\ decls)
810 let rhs = addImplBoundInf i (map fst newargs) (defs \\ decls)
811 (expandParams decorate newargs defs (defs \\ decls) rhs_in)
811 (expandParams decorate newargs defs (defs \\ decls) rhs_in)
812− logLvl 2 $ "RHS: " ++ showImp True False rhs
812+ logLvl 2 $ "RHS: " ++ showImp Nothing True False rhs
813 ctxt <- getContext -- new context with where block added
813 ctxt <- getContext -- new context with where block added
814 logLvl 5 "STARTING CHECK"
814 logLvl 5 "STARTING CHECK"
815 ((rhs', defer, is), _) <-
815 ((rhs', defer, is), _) <-
@@ -911,7 +911,7 @@ elabClause info tcgen (_, PWith fc fname lhs_in withs wval_in withblock)
911 -- pattern bindings
911 -- pattern bindings
912 i <- getIState
912 i <- getIState
913 let lhs = addImplPat i lhs_in
913 let lhs = addImplPat i lhs_in
914− logLvl 5 ("LHS: " ++ showImp True False lhs)
914+ logLvl 5 ("LHS: " ++ showImp Nothing True False lhs)
915 ((lhs', dlhs, []), _) <-
915 ((lhs', dlhs, []), _) <-
916 tclift $ elaborate ctxt (MN 0 "patLHS") infP []
916 tclift $ elaborate ctxt (MN 0 "patLHS") infP []
917 (erun fc (buildTC i info True tcgen fname (infTerm lhs)))
917 (erun fc (buildTC i info True tcgen fname (infTerm lhs)))
@@ -923,7 +923,7 @@ elabClause info tcgen (_, PWith fc fname lhs_in withs wval_in withblock)
923 logLvl 5 ("Checked " ++ show clhs)
923 logLvl 5 ("Checked " ++ show clhs)
924 let bargs = getPBtys lhs_tm
924 let bargs = getPBtys lhs_tm
925 let wval = addImplBound i (map fst bargs) wval_in
925 let wval = addImplBound i (map fst bargs) wval_in
926− logLvl 5 ("Checking " ++ showImp True False wval)
926+ logLvl 5 ("Checking " ++ showImp Nothing True False wval)
927 -- Elaborate wval in this context
927 -- Elaborate wval in this context
928 ((wval', defer, is), _) <-
928 ((wval', defer, is), _) <-
929 tclift $ elaborate ctxt (MN 0 "withRHS")
929 tclift $ elaborate ctxt (MN 0 "withRHS")
@@ -980,7 +980,7 @@ elabClause info tcgen (_, PWith fc fname lhs_in withs wval_in withblock)
980 (map (pexp . (PRef fc) . fst) bargs_pre ++
980 (map (pexp . (PRef fc) . fst) bargs_pre ++
981 pexp wval :
981 pexp wval :
982 (map (pexp . (PRef fc) . fst) bargs_post))
982 (map (pexp . (PRef fc) . fst) bargs_post))
983− logLvl 5 ("New RHS " ++ showImp True False rhs)
983+ logLvl 5 ("New RHS " ++ showImp Nothing True False rhs)
984 ctxt <- getContext -- New context with block added
984 ctxt <- getContext -- New context with block added
985 i <- getIState
985 i <- getIState
986 ((rhs', defer, is), _) <-
986 ((rhs', defer, is), _) <-
@@ -1009,8 +1009,8 @@ elabClause info tcgen (_, PWith fc fname lhs_in withs wval_in withblock)
1009 mkAux wname toplhs ns ns' (PClause fc n tm_in (w:ws) rhs wheres)
1009 mkAux wname toplhs ns ns' (PClause fc n tm_in (w:ws) rhs wheres)
1010 = do i <- getIState
1010 = do i <- getIState
1011 let tm = addImplPat i tm_in
1011 let tm = addImplPat i tm_in
1012− logLvl 2 ("Matching " ++ showImp True False tm ++ " against " ++
1012+ logLvl 2 ("Matching " ++ showImp Nothing True False tm ++ " against " ++
1013− showImp True False toplhs)
1013+ showImp Nothing True False toplhs)
1014 case matchClause i toplhs tm of
1014 case matchClause i toplhs tm of
1015 Left f -> fail $ show fc ++ ":with clause does not match top level"
1015 Left f -> fail $ show fc ++ ":with clause does not match top level"
1016 Right mvars ->
1016 Right mvars ->
@@ -1020,8 +1020,8 @@ elabClause info tcgen (_, PWith fc fname lhs_in withs wval_in withblock)
1020 mkAux wname toplhs ns ns' (PWith fc n tm_in (w:ws) wval withs)
1020 mkAux wname toplhs ns ns' (PWith fc n tm_in (w:ws) wval withs)
1021 = do i <- getIState
1021 = do i <- getIState
1022 let tm = addImplPat i tm_in
1022 let tm = addImplPat i tm_in
1023− logLvl 2 ("Matching " ++ showImp True False tm ++ " against " ++
1023+ logLvl 2 ("Matching " ++ showImp Nothing True False tm ++ " against " ++
1024− showImp True False toplhs)
1024+ showImp Nothing True False toplhs)
1025 withs' <- mapM (mkAuxC wname toplhs ns ns') withs
1025 withs' <- mapM (mkAuxC wname toplhs ns ns') withs
1026 case matchClause i toplhs tm of
1026 case matchClause i toplhs tm of
1027 Left _ -> fail $ show fc ++ "with clause does not match top level"
1027 Left _ -> fail $ show fc ++ "with clause does not match top level"
@@ -1118,7 +1118,7 @@ elabClass info syn doc fc constraints tn ps ds
1118 getMName (PTy _ _ _ _ n _) = nsroot n
1118 getMName (PTy _ _ _ _ n _) = nsroot n
1119 tdecl allmeths (PTy doc syn _ o n t)
1119 tdecl allmeths (PTy doc syn _ o n t)
1120 = do t' <- implicit' syn allmeths n t
1120 = do t' <- implicit' syn allmeths n t
1121− logLvl 5 $ "Method " ++ show n ++ " : " ++ showImp True False t'
1121+ logLvl 5 $ "Method " ++ show n ++ " : " ++ showImp Nothing True False t'
1122 return ( (n, (toExp (map fst ps) Exp t')),
1122 return ( (n, (toExp (map fst ps) Exp t')),
1123 (n, (doc, o, (toExp (map fst ps) Imp t'))),
1123 (n, (doc, o, (toExp (map fst ps) Imp t'))),
1124 (n, (syn, o, t) ) )
1124 (n, (syn, o, t) ) )
@@ -1152,8 +1152,8 @@ elabClass info syn doc fc constraints tn ps ds
1152 let lhs = PApp fc (PRef fc cfn) [pconst capp]
1152 let lhs = PApp fc (PRef fc cfn) [pconst capp]
1153 let rhs = PResolveTC (FC "HACK" 0)
1153 let rhs = PResolveTC (FC "HACK" 0)
1154 let ty = PPi constraint (MN 0 "pc") c con
1154 let ty = PPi constraint (MN 0 "pc") c con
1155− iLOG (showImp True False ty)
1155+ iLOG (showImp Nothing True False ty)
1156− iLOG (showImp True False lhs ++ " = " ++ showImp True False rhs)
1156+ iLOG (showImp Nothing True False lhs ++ " = " ++ showImp Nothing True False rhs)
1157 i <- getIState
1157 i <- getIState
1158 let conn = case con of
1158 let conn = case con of
1159 PRef _ n -> n
1159 PRef _ n -> n
@@ -1177,9 +1177,9 @@ elabClass info syn doc fc constraints tn ps ds
1177 let anames = map (\x -> MN x "arg") [0..]
1177 let anames = map (\x -> MN x "arg") [0..]
1178 let lhs = PApp fc (PRef fc m) (pconst capp : lhsArgs margs anames)
1178 let lhs = PApp fc (PRef fc m) (pconst capp : lhsArgs margs anames)
1179 let rhs = PApp fc (getMeth mnames all m) (rhsArgs margs anames)
1179 let rhs = PApp fc (getMeth mnames all m) (rhsArgs margs anames)
1180− iLOG (showImp True False ty)
1180+ iLOG (showImp Nothing True False ty)
1181 iLOG (show (m, ty', capp, margs))
1181 iLOG (show (m, ty', capp, margs))
1182− iLOG (showImp True False lhs ++ " = " ++ showImp True False rhs)
1182+ iLOG (showImp Nothing True False lhs ++ " = " ++ showImp Nothing True False rhs)
1183 return [PTy doc syn fc o m ty',
1183 return [PTy doc syn fc o m ty',
1184 PClauses fc [Inlinable] m [PClause fc m lhs [] rhs []]]
1184 PClauses fc [Inlinable] m [PClause fc m lhs [] rhs []]]
@@ -1520,8 +1520,8 @@ elabCaseBlock info d@(PClauses f o n ps)
1521checkInferred :: FC -> PTerm -> PTerm -> Idris ()
1521checkInferred :: FC -> PTerm -> PTerm -> Idris ()
1522checkInferred fc inf user =
1522checkInferred fc inf user =
1523− do logLvl 6 $ "Checked to\n" ++ showImp True False inf ++ "\n\nFROM\n\n" ++
1523+ do logLvl 6 $ "Checked to\n" ++ showImp Nothing True False inf ++ "\n\nFROM\n\n" ++
1524− showImp True False user
1524+ showImp Nothing True False user
1525 logLvl 10 $ "Checking match"
1525 logLvl 10 $ "Checking match"
1526 i <- getIState
1526 i <- getIState
1527 tclift $ case matchClause' True i user inf of
1527 tclift $ case matchClause' True i user inf of
@@ -1538,8 +1538,8 @@ checkInferred fc inf user =
1538inferredDiff :: FC -> PTerm -> PTerm -> Idris Bool
1538inferredDiff :: FC -> PTerm -> PTerm -> Idris Bool
1539inferredDiff fc inf user =
1539inferredDiff fc inf user =
1540 do i <- getIState
1540 do i <- getIState
1541− logLvl 6 $ "Checked to\n" ++ showImp True False inf ++ "\n" ++
1541+ logLvl 6 $ "Checked to\n" ++ showImp Nothing True False inf ++ "\n" ++
1542− showImp True False user
1542+ showImp Nothing True False user
1543 tclift $ case matchClause' True i user inf of
1543 tclift $ case matchClause' True i user inf of
1544 Right vs -> return False
1544 Right vs -> return False
1545 Left (x, y) -> return True
1545 Left (x, y) -> return True