Skip to content

Simplify code and allow more optimisation on linearly typed code

Arnaud Spiwack requested to merge tweag/ghc:lt/simplify-and-optimise into master

Following the new principles delineated in !8932 (closed), this PR removes two conditions that block optimisations in presence of linearly typed code. This strictly removes code, which is nice. We allow

  • CPR on constructors with unrestricted fields
  • push coercions through lambdas and through applications even if some multiplicity information gets lost

Merge request reports

Loading