Skip to content

Fix FreeVars computation for mdo

sheaf requested to merge sheaf/ghc:T21654 into master

Commit acb188e0 introduced a regression in the computation of free variables in mdo statements, as the logic in GHC.Rename.Expr.segmentRecStmts was slightly different depending on whether the recursive do block corresponded to an mdo statement or a rec statment.

This patch recovers the previous computation for mdo blocks.

Merge request reports