Save the type of breakpoints in the Breakpoint tick in STG
We need to preserve the type of breakpoints to be able to generate GHCi bytecode from STG instead of core (see !4412 (closed), which adds unboxed sums and tuples support to GHCi).
In !4412 (closed) I first added a
Maybe Type field to the
StgTick constructor, which has the downside of being imprecise. We really only need to preserve the type for breakpoints, not for other ticks, for the time being.
This is an attempt to make it precise using a ttg scheme:
GenTickish passwith an
XBreakpointextension field in
type Tickish = GenTickish 'TickishCorefor the core phase.
XBreakpointis empty, so we can retain the
Eqinstances as before
type StgTickish = GenTickish 'TickishStg,
CoreToStgnow also converts the
I think the
id type argument of
Tickish (and now
GenTickish) can now actually be dropped, and replaced by type functions of
TickishPass. I haven't had time to implement this yet.
If this gets accepted, I'll rebase !4412 (closed) on top of this.