Skip to content

th: Weaken return type of myCoreToStgExpr

Matthew Pickering requested to merge wip/t20060 into master

The previous code assumed properties of the CoreToStg translation, namely that a core let expression which be translated to a single non-recursive top-level STG binding. This assumption was false, as evidenced by #20060 (closed).

The consequence of this was the need to modify the call sites of myCoreToStgExpr, the main one being in hscCompileCoreExpr', which the meant we had to use byteCodeGen instead of stgExprToBCOs to convert the returned value to bytecode.

I removed the stgExprToBCOs function as it is no longer used in the compiler.

There is still some partiallity with this patch (the lookup in hscCompileCoreExpr') but this should be more robust that before.

Fixes #20060 (closed)

cc @luite

Merge request reports