Add IsList instance for CallStack, restore Show instance for CallStack
authorRyanGlScott <ryan.gl.scott@gmail.com>
Fri, 12 Feb 2016 14:24:38 +0000 (09:24 -0500)
committerRyanGlScott <ryan.gl.scott@gmail.com>
Fri, 12 Feb 2016 14:24:49 +0000 (09:24 -0500)
commitbe3d7f661968a7b8c6751c0be3bf23e703b32c3e
treed32fea604192a2c6e6f5a402f79a982f8ee17f32
parent8da6a162416d448309ced16b00f54a32b5ee750b
Add IsList instance for CallStack, restore Show instance for CallStack

Summary:
Ties up loose ends from D1894.

GHC 7.10.2 and 7.10.3 featured a `Show` instance for `CallStack`, but since it
was derived, it broke encapsulation. This adds a `Show` instance which displays
the `CallStack` as if it were a `[(String, SrcLoc)]`.

To ensure that the output of `Show` is technically a valid Haskell term, we
also add a corresponding `IsList CallStack` instance.

Reviewers: gridaphobe, austin, hvr, bgamari

Reviewed By: gridaphobe, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1903
libraries/base/GHC/Exception.hs
libraries/base/GHC/Exts.hs
libraries/base/GHC/Show.hs
libraries/base/GHC/Stack.hs
libraries/base/GHC/Stack/Types.hs
libraries/base/changelog.md