Introduce -fcatch-bottoms
authorBen Gamari <bgamari.foss@gmail.com>
Thu, 20 Jul 2017 02:31:16 +0000 (22:31 -0400)
committerBen Gamari <ben@smart-cactus.org>
Thu, 20 Jul 2017 12:37:55 +0000 (08:37 -0400)
commit8e51bfc33c17aef41677a2b6189e3d4f31454cbc
tree09f9276963d8b9134fca7f54b167a8abd8a8fd25
parenteeb141df7369d90f101c731adf12bbe46b42aa19
Introduce -fcatch-bottoms

This flag instructs the simplifier to emit ``error`` expressions in the
continutation of empty case analyses (which should bottom and
consequently not return). This is helpful when debugging demand analysis
bugs which can sometimes manifest as segmentation faults.

Test Plan: Validate

Reviewers: simonpj, austin

Subscribers: niteria, rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3736
compiler/coreSyn/CorePrep.hs
compiler/coreSyn/CoreUtils.hs
compiler/main/DynFlags.hs
docs/users_guide/debugging.rst
utils/mkUserGuidePart/Options/CompilerDebugging.hs