Skip to content

Persist CorePrepProv into IfaceUnivCoProv

Simon Peyton Jones requested to merge wip/T19768 into master

CorePrepProv is only created in CorePrep, so I thought it wouldn't be needed in IfaceUnivCoProv. But actually IfaceSyn is used during pretty-printing, and we can certainly pretty-print things after CorePrep as #19768 (closed) showed.

So the simplest thing is to represent CorePrepProv in IfaceSyn.

To improve what Lint can do I also added a boolean to CorePrepProv, to record whether it is homogeneously kinded or not. It is introduced in two distinct ways (see Note [Unsafe coercions] in GHC.CoreToStg.Prep), one of which may be hetero-kinded (e.g. Int ~ Int#) beause it is casting a divergent expression; but the other is not. The boolean keeps track.

Merge request reports