Opened 8 months ago

#1354 new task

Clean up the expander a bit

Reported by: sjamaan Owned by: sjamaan
Priority: minor Milestone: 5.1
Component: expander Version: 5.0
Keywords: expander Cc:
Estimated difficulty: hard

Description

Currently the expander is full of hooks and hacks, mostly for maintaining the line number database and various syntactic environments. It would be nice if we can clean things up a bit. A few ideas:

  • ##sys#syntax-context and ##sys#syntax-error/context are weird and can maybe be cleaned up if we can make ##sys#check-syntax work better with line number info.
  • ##sys#syntax-error-culprit seems to be unnecessary, because while expanding ##sys#check-syntax should have access to the input form already?
  • ##sys#line-number-database is defined in expander, but only really used in core.scm (except for getting the line number)
  • The new expansion-result-hook is yet another hook, and can perhaps be combined with the previous two.
  • The special-cased hack in ##sys#canonicalize-body that prevents expansion of import and hands back control to the compiler after expansion of ##core#module) (in a currently pending patch) needs to die. No clue yet how to do this...

Change History (0)

Note: See TracTickets for help on using tickets.