Skip to content

Only store Name in FunRhs rather than Id with knot-tied fields

Matthew Pickering requested to merge wip/t22695 into master

The Note [fixM for rhs_ty in tcMonoBinds] explains that certain fields of the Id created here are knot-tied and can't be referenced inside the scope of the fixM. The modification to FunRhs ensures that we can't accidentally force the knot-tied fields of the Id. The Name is just used for error messages and printing.

The result is that when -dppr-debug was enabled the compiler would hang because the debug printing of the Id would try and print fields which were not populated yet.

Fixes #22695 (closed)

Perhaps @simonpj for a quick review, I am not sure if we should backport this because it modifies the AST.

Merge request reports