Skip to content

TTG-ify StgLam

Leif Metcalf requested to merge wip/leif/stg-ttg into master

Hello,

I've implemented a TODO in Stg.Syntax:

StgLam is used *only* during CoreToStg's work. Before CoreToStg has finished it
encodes (\x -> e) as (let f = \x -> e in f) TODO: Encode this via an extension
to GenStgExpr à la TTG.

I copied the implementation from Hs.Expr. One annoyance is that the type instances for XXStgExpr must be defined in Stg.Syntax rather than in Stg.Lift.Analysis and CoreToStg, since the instances are needed for pretty-printing in Stg.Syntax.

Edited by Leif Metcalf

Merge request reports