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,247
    • Issues 5,247
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 577
    • Merge requests 577
  • 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
  • !7652

GenStgAlt 3-tuple synonym --> Record type

  • Review changes

  • Download
  • Email patches
  • Plain diff
Closed doyougnu requested to merge doyougnu/ghc:wip/StgAlt_ADT into master Feb 24, 2022
  • Overview 21
  • Commits 1
  • Pipelines 9
  • Changes 18

What

This MR changes GenStgAlt from a 3-tuple type synonym to a Record type with field accessors. This is purely a quality of life refactor.

Why

In pursuit of #21078 (closed). Previous iterations of ghcjs used lenses to project from GenStgAlt, obviously we don't want to use lenses in the new js-backend and so making GenStgAlt a proper record type, with field accessors and a small amount of helper functions makes it easier to adapt code for the new js-backend and helps clean up use sites in GHC itself.

Other stuff

I opted to make GenStgAlt strict. The CI showed no issues with making the fields lazy so I felt comfortable defaulting to strict datatypes, especially since anything in GenStgAlt will eventually be consumed.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: wip/StgAlt_ADT