diff options
author | Ömer Sinan Ağacan <omeragacan@gmail.com> | 2018-02-18 11:12:53 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-02-18 11:57:46 -0500 |
commit | 7f389a580f42a105623853adad15ab3323b41ed5 (patch) | |
tree | ce072fb7732bd1626ed9ed214e60d2bdd5dee848 /testsuite/tests/gadt/gadt8.hs | |
parent | fc33f8b31b9c23cc12f02a028bbaeab06ba8fe96 (diff) | |
download | haskell-7f389a580f42a105623853adad15ab3323b41ed5.tar.gz |
StgLint overhaul
- Remove all type checks
- Check two STG invariants (no unboxed let bindings, variables defined
before used) and post-unarisation invariants.
See the module header and #14787.
This version validates with `-dstg-lint` added to `GhcStage2HcOpts` and
`GhcLibHcOpts` and `EXTRA_HC_OPTS`.
Unarise changes:
- `unariseConArgBinder` and `unariseFunArgBinder` functions were almost
the same; only difference was when unarising fun args we keep void
args while in con args we drop them. A new function `unariseArgBinder`
added with a `Bool` argument for whether we're unarising a con arg.
`unariseConArgBinder` and `unariseFunArgBinder` are now defined as
unariseConArgBinder = unarsieArgBinder True -- data con
unariseFunArgBinder = unariseArgBinder False -- not data con
- A bug in `unariseConArgBinder` and `unariseFunArgBinder` (which are
just calls to `unariseArgBinder` now) that invalidated the
post-unarise invariants when the argument has single type rep (i.e.
`length (typePrimRep x) == 1`) fixed. This isn't a correctness issue
(it's fine not to unarise if a variable is already represented as
single value), but it triggers StgLint.
Test Plan:
- Pass testsuite with `-dstg-lint` [done]
- Boot stage2 (including libraries) with `-dstg-lint` [done]
Reviewers: simonpj, bgamari
Reviewed By: bgamari
Subscribers: duog, rwbarton, thomie, carter
GHC Trac Issues: #14787
Differential Revision: https://phabricator.haskell.org/D4404
Diffstat (limited to 'testsuite/tests/gadt/gadt8.hs')
0 files changed, 0 insertions, 0 deletions