Skip to content
Snippets Groups Projects

Save the type of breakpoints in the Breakpoint tick in STG

Closed Luite Stegeman requested to merge luite/ghc:gentickish into master

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:

  1. Generalise Tickish to GenTickish pass with an XBreakpoint extension field in Breakpoint
  2. type Tickish = GenTickish 'TickishCore for the core phase. XBreakpoint is empty, so we can retain the Ord and Eq instances as before
  3. type StgTickish = GenTickish 'TickishStg, XBreakpoint is Type.
  4. CoreToStg now also converts the Tickish values.

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.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading