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 Type/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:
- Generalise
TickishtoGenTickish passwith anXBreakpointextension field inBreakpoint -
type Tickish = GenTickish 'TickishCorefor the core phase.XBreakpointis empty, so we can retain theOrdandEqinstances as before -
type StgTickish = GenTickish 'TickishStg,XBreakpointisType. -
CoreToStgnow also converts theTickishvalues.
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.