Produce KindReps for common kinds in GHC.Types
authorBen Gamari <bgamari.foss@gmail.com>
Fri, 3 Mar 2017 20:47:47 +0000 (15:47 -0500)
committerBen Gamari <ben@smart-cactus.org>
Fri, 3 Mar 2017 20:47:48 +0000 (15:47 -0500)
commitc1dacb8a9c18677495bbe7e41391f8ca7a573070
tree9f3e33766337e42511b75795b264bc4393c08ade
parenta694cee77b64235b42029fea248453ddf6b17d17
Produce KindReps for common kinds in GHC.Types

Unfortunately this comes with a fair bit of implementation cost. Perhaps
some refactoring would help, but in the interest of getting 8.2 out the
door I'm pushing as-is.

While this doesn't have nearly the effect on compiler allocations
that D3166 has, it's still nothing to sneeze at. nofib shows,
```
------------------------------------------------------------------------
        Program               master           D3166            D3219
------------------------------------------------------------------------
        -1 s.d.                -----          -3.555%          -4.081%
        +1 s.d.                -----          +1.937%          +1.593%
        Average                -----          -0.847%          -1.285%
```

Test Plan: Validate

Reviewers: austin

Subscribers: thomie, simonmar

Differential Revision: https://phabricator.haskell.org/D3219
14 files changed:
compiler/prelude/PrelNames.hs
compiler/typecheck/TcTypeable.hs
testsuite/tests/deSugar/should_compile/T2431.stderr
testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr
testsuite/tests/roles/should_compile/Roles1.stderr
testsuite/tests/roles/should_compile/Roles13.stderr
testsuite/tests/roles/should_compile/Roles14.stderr
testsuite/tests/roles/should_compile/Roles2.stderr
testsuite/tests/roles/should_compile/Roles3.stderr
testsuite/tests/roles/should_compile/Roles4.stderr
testsuite/tests/roles/should_compile/T8958.stderr
testsuite/tests/simplCore/should_compile/T7360.stderr
testsuite/tests/simplCore/should_compile/T8274.stdout
testsuite/tests/th/TH_Roles2.stderr