GenStgAlt 3-tuple synonym --> Record type
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.