Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,347
    • Issues 5,347
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 568
    • Merge requests 568
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Merge requests
  • !2952

Optimise nullary type constructor usage

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Ben Gamari requested to merge wip/tyconapp-opts into master Mar 24, 2020
  • Overview 77
  • Commits 3
  • Pipelines 36
  • Changes 83

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 Nov 11, 2020 by Ben Gamari
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: wip/tyconapp-opts