Remove some horrible munging of origins for Coercible
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 18 Jun 2015 13:12:54 +0000 (14:12 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Thu, 18 Jun 2015 13:15:59 +0000 (14:15 +0100)
commit02bac0254182def11029e2f7373ba8d2ba9ebe44
tree9b254a1af59a751f28af395b98b52b51b0d61a39
parent4a7a6c3ac869f74dfe1c9af09c48faadc0ecba16
Remove some horrible munging of origins for Coercible

I just didn't think it was buying enough for all the cruft it caused.
We can put some back if people start complaining about poor error
messages. I forget quite how I tripped over this but I got sucked in.

* Lots of tidying up in TcErrors

* Rename pprArisingAt to pprCtLoc, by analogy with pprCtOrigin

* Remove CoercibleOrigin data constructor from CtOrigin

* Make relevantBindings return a Ct with a zonked
  and tidied CtOrigin

* Add to TcRnTypes
      ctOrigin   :: Ct -> CtOrigin
      ctEvOrigin :: CtEvidence -> CtOrigin
      setCtLoc   :: Ct -> CtLoc -> Ct
33 files changed:
compiler/typecheck/Inst.hs
compiler/typecheck/TcErrors.hs
compiler/typecheck/TcMType.hs
compiler/typecheck/TcRnTypes.hs
testsuite/tests/deriving/should_fail/T4846.stderr
testsuite/tests/deriving/should_fail/T5498.stderr
testsuite/tests/deriving/should_fail/T6147.stderr
testsuite/tests/deriving/should_fail/T7148.stderr
testsuite/tests/deriving/should_fail/T7148a.stderr
testsuite/tests/deriving/should_fail/T8851.stderr
testsuite/tests/deriving/should_fail/T8984.stderr
testsuite/tests/gadt/CasePrune.stderr
testsuite/tests/ghci/scripts/Defer02.stderr
testsuite/tests/ghci/scripts/T8649.stderr
testsuite/tests/ghci/scripts/ghci050.stderr
testsuite/tests/ghci/scripts/ghci051.stderr
testsuite/tests/ghci/scripts/ghci052.stderr
testsuite/tests/ghci/scripts/ghci053.stderr
testsuite/tests/indexed-types/should_fail/T6088.stderr
testsuite/tests/indexed-types/should_fail/T9580.stderr
testsuite/tests/module/mod180.stderr
testsuite/tests/polykinds/T7438.stderr
testsuite/tests/roles/should_fail/Roles10.stderr
testsuite/tests/roles/should_fail/RolesIArray.stderr
testsuite/tests/typecheck/bug1465/bug1465.stderr
testsuite/tests/typecheck/should_compile/FD3.stderr
testsuite/tests/typecheck/should_fail/T10285.stderr
testsuite/tests/typecheck/should_fail/T10495.stderr
testsuite/tests/typecheck/should_fail/T10534.stderr
testsuite/tests/typecheck/should_fail/T5853.stderr
testsuite/tests/typecheck/should_fail/TcCoercibleFail.stderr
testsuite/tests/typecheck/should_fail/TcCoercibleFail3.stderr
testsuite/tests/typecheck/should_fail/tcfail182.stderr