diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2019-09-30 14:48:47 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-10-08 13:25:37 -0400 |
commit | bf02c26402cf926d41c006ab930ed9747e92a373 (patch) | |
tree | 484b0fce35c10a475509d6c07abbb82ddcb8dc6e /compiler/utils/FastString.hs | |
parent | 6a5c249d54d542d765ddbd80161ef4796c781de1 (diff) | |
download | haskell-bf02c26402cf926d41c006ab930ed9747e92a373.tar.gz |
Mark newtype constructors as used in the Coercible solver (#10347)
Currently, newtype constructors are not marked as used when they are
accessed under the hood by uses of `coerce`, as described in #10347.
This fixes #10347 by co-opting the `tcg_keep` field of `TcGblEnv`
to track uses of newtype constructors in the `Coercible` solver.
See `Note [Tracking unused binding and imports]` in `TcRnTypes`.
Since #10347 is fixed, I was able to simplify the code in `TcDeriv`
slightly, as the hack described in
`Note [Newtype deriving and unused constructors]`
is no longer necessary.
Diffstat (limited to 'compiler/utils/FastString.hs')
0 files changed, 0 insertions, 0 deletions