drop { }
] [
swap '[
- first2 dupd first2 "Fixup: `%s` got renamed to `%s` in %s" sprintf
- swap drop f
+ first2 dupd first2 "Fixup: %s renamed to %s in Factor %s" sprintf
+ swap drop no-op-action
_ <restart>
] map
] if-empty ;
TUPLE: debugger < track error restarts restart-hook restart-list continuation ;
+! The "Abort" restart is actually an `f` object, so to show a restart
+! with information but do nothing, we define a no-op-action
+SINGLETON: no-op-action
+
<PRIVATE
SINGLETON: restart-renderer
: <restart-list> ( debugger -- gadget )
dup restarts>> f prefix <model> restart-renderer <table>
- [ [ \ continue-restart invoke-command ] when* ] >>action
+ [
+ [
+ dup obj>> no-op-action =
+ [ drop ] [ \ continue-restart invoke-command ] if
+ ] when*
+ ] >>action
swap restart-hook>> >>hook
t >>selection-required?
t >>single-click? ; inline
USING: accessors arrays assocs calendar combinators
combinators.short-circuit concurrency.flags
concurrency.mailboxes continuations destructors documents
-documents.elements fonts hashtables help help.markup help.tips
+documents.elements fixups fonts hashtables help help.markup help.tips
io io.styles kernel lexer listener literals math math.vectors
models models.arrow models.delay namespaces parser prettyprint
sequences source-files.errors splitting strings system threads
:: <debugger-popup> ( error continuation interactor -- popup )
error
continuation
- error compute-restarts
+ continuation error compute-fixups
+ error compute-restarts append
error interactor make-restart-hook-quot
<debugger> frame-debugger ;