Skip to content

Flatten nested casts in the simple optimizer

Alexis King requested to merge lexi.lambda/ghc:simple-opt-fuse-casts into master

Normally, we aren’t supposed to generated any nested casts, since mkCast takes care to flatten them, but the simple optimizer didn’t use mkCast, so they could show up after inlining. This isn’t really a problem, since the simplifier will clean them up immediately anyway, but it can clutter the -ddump-ds output, and it’s an extremely easy fix.

Closes #18112 (closed).

Merge request reports