@@ -571,7 +571,7 @@ elabClause info opts (cnum, PClause fc fname lhs_in_as withs rhs_in_as wherebloc
572 ((ElabResult lhs' dlhs [] ctxt' newDecls highlights, probs, inj), _) <-
572 ((ElabResult lhs' dlhs [] ctxt' newDecls highlights, probs, inj), _) <-
573 tclift $ elaborate ctxt (idris_datatypes i) (sMN 0 "patLHS") infP initEState
573 tclift $ elaborate ctxt (idris_datatypes i) (sMN 0 "patLHS") infP initEState
574− (do res <- errAt "left hand side of " fname
574+ (do res <- errAt "left hand side of " fname Nothing
575 (erun fc (buildTC i info ELHS opts fname (infTerm lhs)))
575 (erun fc (buildTC i info ELHS opts fname (infTerm lhs)))
576 probs <- get_probs
576 probs <- get_probs
577 inj <- get_inj
577 inj <- get_inj
@@ -655,9 +655,9 @@ elabClause info opts (cnum, PClause fc fname lhs_in_as withs rhs_in_as wherebloc
655 mapM_ setinj (nub (tcparams ++ inj))
655 mapM_ setinj (nub (tcparams ++ inj))
656 setNextName
656 setNextName
657 (ElabResult _ _ is ctxt' newDecls highlights) <-
657 (ElabResult _ _ is ctxt' newDecls highlights) <-
658− errAt "right hand side of " fname
658+ errAt "right hand side of " fname (Just clhsty)
659 (erun fc (build i winfo ERHS opts fname rhs))
659 (erun fc (build i winfo ERHS opts fname rhs))
660− errAt "right hand side of " fname
660+ errAt "right hand side of " fname (Just clhsty)
661 (erun fc $ psolve lhs_tm)
661 (erun fc $ psolve lhs_tm)
662 hs <- get_holes
662 hs <- get_holes
663 mapM_ (elabCaseHole is) hs
663 mapM_ (elabCaseHole is) hs
@@ -677,7 +677,7 @@ elabClause info opts (cnum, PClause fc fname lhs_in_as withs rhs_in_as wherebloc
677 logLvl 4 $ "---> " ++ show rhs'
677 logLvl 4 $ "---> " ++ show rhs'
678 when (not (null defer)) $ logLvl 1 $ "DEFERRED " ++
678 when (not (null defer)) $ logLvl 1 $ "DEFERRED " ++
679 show (map (\ (n, (_,_,t,_)) -> (n, t)) defer)
679 show (map (\ (n, (_,_,t,_)) -> (n, t)) defer)
680− def' <- checkDef fc (Elaborating "deferred type of ") defer
680+ def' <- checkDef fc (\n -> Elaborating "deferred type of " n Nothing) defer
681 let def'' = map (\(n, (i, top, t, ns)) -> (n, (i, top, t, ns, False))) def'
681 let def'' = map (\(n, (i, top, t, ns)) -> (n, (i, top, t, ns, False))) def'
682 addDeferred def''
682 addDeferred def''
683 mapM_ (\(n, _) -> addIBC (IBCDef n)) def''
683 mapM_ (\(n, _) -> addIBC (IBCDef n)) def''
@@ -817,7 +817,7 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in pn_in withblock)
817 logLvl 2 ("LHS: " ++ show lhs)
817 logLvl 2 ("LHS: " ++ show lhs)
818 (ElabResult lhs' dlhs [] ctxt' newDecls highlights, _) <-
818 (ElabResult lhs' dlhs [] ctxt' newDecls highlights, _) <-
819 tclift $ elaborate ctxt (idris_datatypes i) (sMN 0 "patLHS") infP initEState
819 tclift $ elaborate ctxt (idris_datatypes i) (sMN 0 "patLHS") infP initEState
820− (errAt "left hand side of with in " fname
820+ (errAt "left hand side of with in " fname Nothing
821 (erun fc (buildTC i info ELHS opts fname (infTerm lhs))) )
821 (erun fc (buildTC i info ELHS opts fname (infTerm lhs))) )
822 setContext ctxt'
822 setContext ctxt'
823 processTacticDecls info newDecls
823 processTacticDecls info newDecls
@@ -842,7 +842,7 @@ elabClause info opts (_, PWith fc fname lhs_in withs wval_in pn_in withblock)
842 mapM_ addPSname (allNamesIn lhs_in)
842 mapM_ addPSname (allNamesIn lhs_in)
843 setNextName
843 setNextName
844 -- TODO: may want where here - see winfo abpve
844 -- TODO: may want where here - see winfo abpve
845− (ElabResult _ d is ctxt' newDecls highlights) <- errAt "with value in " fname
845+ (ElabResult _ d is ctxt' newDecls highlights) <- errAt "with value in " fname Nothing
846 (erun fc (build i info ERHS opts fname (infTerm wval)))
846 (erun fc (build i info ERHS opts fname (infTerm wval)))
847 erun fc $ psolve lhs_tm
847 erun fc $ psolve lhs_tm
848 tt <- get_term
848 tt <- get_term