Commit b41111c
Fix procedure repr regression: restore #<procedure> display
PR #43's perf optimization switched procedures from cons-list to raw
Python tuples, but nothing gave the tuple a custom repr, so notebook
Out[] cells and Python repr() dumped the raw (tag, fn, bodies, formals,
env, safe) contents instead of "#<procedure>". make_proc now wraps its
result in _ProcTuple, a zero-overhead tuple subclass with __repr__,
leaving the hotter continuation/fail/handler construction paths
untouched.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 6ae3c3a commit b41111c
2 files changed
Lines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
548 | 556 | | |
549 | | - | |
| 557 | + | |
550 | 558 | | |
551 | 559 | | |
552 | 560 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
540 | 548 | | |
541 | | - | |
| 549 | + | |
542 | 550 | | |
543 | 551 | | |
544 | 552 | | |
| |||
0 commit comments