X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcRnMonad.lhs;h=a8146ba4457bfcb275a05d46a7f6f97427dcfcd4;hp=8a0b4f4826782aa5fffe5fb9b015690864ff3376;hb=9091712c838f741b0b9407c4f25600b40e5705b5;hpb=a4cb65161fd2c34e4455985490220bdf5d30cbe5 diff --git a/compiler/typecheck/TcRnMonad.lhs b/compiler/typecheck/TcRnMonad.lhs index 8a0b4f4..a8146ba 100644 --- a/compiler/typecheck/TcRnMonad.lhs +++ b/compiler/typecheck/TcRnMonad.lhs @@ -711,11 +711,11 @@ getInstLoc origin = do { loc <- getSrcSpanM ; env <- getLclEnv ; return (InstLoc origin loc (tcl_ctxt env)) } -addInstCtxt :: InstLoc -> TcM a -> TcM a +setInstCtxt :: InstLoc -> TcM a -> TcM a -- Add the SrcSpan and context from the first Inst in the list -- (they all have similar locations) -addInstCtxt (InstLoc _ src_loc ctxt) thing_inside - = setSrcSpan src_loc (updCtxt (\_ -> ctxt) thing_inside) +setInstCtxt (InstLoc _ src_loc ctxt) thing_inside + = setSrcSpan src_loc (setErrCtxt ctxt thing_inside) \end{code} The addErrTc functions add an error message, but do not cause failure.