diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-03-24 13:13:43 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-12-14 13:37:09 -0500 |
commit | 7e9debd4ceb068effe8ac81892d2cabcb8f55850 (patch) | |
tree | f222f3f3e5d662a12ab00fcb1a81d8e8dfb6c0de /utils | |
parent | c696bb2f4476e0ce4071e0d91687c1fe84405599 (diff) | |
download | haskell-7e9debd4ceb068effe8ac81892d2cabcb8f55850.tar.gz |
Optimise nullary type constructor usage
During the compilation of programs GHC very frequently deals with
the `Type` type, which is a synonym of `TYPE 'LiftedRep`. This patch
teaches GHC to avoid expanding the `Type` synonym (and other nullary
type synonyms) during type comparisons, saving a good amount of work.
This optimisation is described in `Note [Comparing nullary type
synonyms]`.
To maximize the impact of this optimisation, we introduce a few
special-cases to reduce `TYPE 'LiftedRep` to `Type`. See
`Note [Prefer Type over TYPE 'LiftedPtrRep]`.
Closes #17958.
Metric Decrease:
T18698b
T1969
T12227
T12545
T12707
T14683
T3064
T5631
T5642
T9020
T9630
T9872a
T13035
haddock.Cabal
haddock.base
Diffstat (limited to 'utils')
m--------- | utils/haddock | 0 |
1 files changed, 0 insertions, 0 deletions
diff --git a/utils/haddock b/utils/haddock -Subproject acf235d607879eb9542127eb0ddb42a250b5b85 +Subproject 48c4982646b7fe6343ccdf1581c97a7735fe894 |