Hide the CallStack implicit parameter
authorEric Seidel <gridaphobe@gmail.com>
Mon, 1 Feb 2016 13:32:19 +0000 (14:32 +0100)
committerBen Gamari <ben@smart-cactus.org>
Mon, 1 Feb 2016 13:32:25 +0000 (14:32 +0100)
commit94048f9fb01c541215cfc9cc215af83566b63236
treee2407615eaf3b9d2298ebf0c688d04bbb5f40bd2
parent0d601657ca6ec1812492bb16a7d0e181b370e2d8
Hide the CallStack implicit parameter

The implicit parameter isn't actually very relevant to the CallStack
machinery, so we hide the implementation details behind a constraint
alias

```
type HasCallStack = (?callStack :: CallStack)
```

This has a few benefits:

1. No need to enable `ImplicitParams` in user code.
2. No need to remember the `?callStack` naming convention.
3. Gives us the option to change the implementation details in the
future with less user-land breakage.

The revised `CallStack` API is exported from `GHC.Stack` and makes no
mention of the implicit parameter.

Test Plan: ./validate

Reviewers: simonpj, austin, hvr, bgamari

Reviewed By: simonpj, bgamari

Subscribers: thomie

Projects: #ghc

Differential Revision: https://phabricator.haskell.org/D1818
compiler/typecheck/TcEvidence.hs
docs/users_guide/8.0.1-notes.rst
docs/users_guide/ghci.rst
docs/users_guide/glasgow_exts.rst
libraries/base/GHC/Err.hs
libraries/base/GHC/Exception.hs
libraries/base/GHC/Stack.hs
libraries/base/GHC/Stack/Types.hs
testsuite/driver/testlib.py