Skip to content
Snippets Groups Projects

Optimise nullary type constructor usage

Merged Ben Gamari requested to merge wip/tyconapp-opts into master

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 (closed).

Edited by Ben Gamari

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading