Use implicit CallStacks for ASSERT when available
authorBartosz Nitka <niteria@gmail.com>
Wed, 13 Jan 2016 13:44:58 +0000 (14:44 +0100)
committerBen Gamari <ben@smart-cactus.org>
Wed, 13 Jan 2016 13:52:37 +0000 (14:52 +0100)
commit88d6d5aae2ae86646084f3a060ae911eff589b7a
tree655d293aa89ad51b5bc8883585efdda56416dac7
parent3e796e1ae8b13ec1c607a1864894171a58cef592
Use implicit CallStacks for ASSERT when available

This aids with debugging, since all you have to do to get more
stack frames is add a constraint `(?callStack :: CallStack) =>`.

Old output:
```
ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 8.1.20160107 for x86_64-unknown-linux):
        ASSERT failed!
  file compiler/types/TyCoRep.hs line 1800
  InScope []
  [Xuv :-> n_av5[sk]]
  []
```

New output:
```
ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 8.1.20160107 for x86_64-unknown-linux):
        ASSERT failed!
  CallStack (from ImplicitParams):
  assertPprPanic, called at compiler/types/TyCoRep.hs:1800:95 in
ghc:TyCoRep
  InScope []
  [Xuv :-> n_av5[sk]]
  []
```

Test Plan:
harbormaster
manual testing

Reviewers: austin, gridaphobe, bgamari

Reviewed By: gridaphobe, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1751
compiler/utils/Outputable.hs