diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2018-02-20 12:50:34 -0500 |
---|---|---|
committer | Ryan Scott <ryan.gl.scott@gmail.com> | 2018-02-20 12:50:34 -0500 |
commit | f4336593a390e6317ac2852d8defb54bfa633d3e (patch) | |
tree | e4d4bb150dbc00fd7e2a924f51c2fe19048a600f /ghc.mk | |
parent | f511bb58129f0446d9e74b10b22a127803f7eaf1 (diff) | |
download | haskell-f4336593a390e6317ac2852d8defb54bfa633d3e.tar.gz |
Slight refactor of stock deriving internals
Summary:
Before, the `hasStockDeriving` function, which determines
how derived bindings should be generated for stock classes, was
awkwardly separated from the `checkSideConditions` function, which
checks invariants of the same classes that `hasStockDeriving` does.
As a result, there was a fair deal of hoopla needed to actually use
`hasStockDeriving`.
But this hoopla really isn't required—we should be using
`hasStockDeriving` from within `checkSideConditions`, since they're
looking up information about the same classes! By doing this, we can
eliminate some kludgy code in the form of `mk_eqn_stock'`, which had
an unreachable `pprPanic` that was stinking up the place.
Reviewers: bgamari, dfeuer
Reviewed By: bgamari
Subscribers: dfeuer, rwbarton, thomie, carter
GHC Trac Issues: #13154
Differential Revision: https://phabricator.haskell.org/D4370
Diffstat (limited to 'ghc.mk')
0 files changed, 0 insertions, 0 deletions