Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,261
    • Issues 4,261
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 406
    • Merge Requests 406
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Merge Requests
  • !2952

Merged
Opened Mar 24, 2020 by Ben Gamari@bgamari🐢Maintainer

Optimise nullary type constructor usage

  • Overview 76
  • 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
None
Milestone
None
Assign milestone
Time tracking
Reference: ghc/ghc!2952
Source branch: wip/tyconapp-opts

Revert this commit

This will create a new commit in order to revert the existing changes.

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.

Cherry-pick this commit

Switch branch
Cancel
A new branch will be created in your fork and a new merge request will be started.