The tests are implemented by using a newtype wrapper `TestStack`. This is to
avoid creating `Eq1` and `Show1` instances for `Stack` itself, which are needed
by quickcheck-classes to run with GHC less than 8.5. Tests are automatically
generated by `traversalLaws` and `foldableLaws` using the `Arbitrary` instance
for `TestStack`.
Fix test failures on GHC 8 for `abort` and `new_abort` caused by `error`
appending the stack trace to the error message (since base
4.9.0.0)[1]. This fixes#36.
An alternative is to use `errorWithoutStackTrace` (new in base 4.9.0.0),
but this then requires use of CPP for backwards compatibility.
Remove type constraints prompting GHC to warn about redundant
constraints.
Tested with 7.6.3, 7.8.4, 7.10.3, 8.0.1 (all on NixOS).
[1] https://hackage.haskell.org/package/base-4.9.0.0/docs/GHC-Stack.html