 : is-use-restart ( restart -- ? )
     name>> [ "Use the " head? ] [ " vocabulary" tail? ] bi and ;
 
-: get-restart-vocab ( restart -- vocab )
-    [ "Use the " length ] dip
-    name>> [ length " vocabulary" length - ] keep
-    subseq ;
+: get-restart-vocab ( restart -- vocab/f )
+    obj>> dup word? [ vocabulary>> ] [ drop f ] if ;
 
 : is-suggested-restart ( restart -- ? )
     dup is-use-restart [


PRIVATE>

: fuel-use-suggested-vocabs ( ... suggestions quot: ( ... -- ... ) -- ... )
    [ :uses-suggestions set ] dip
    [ try-suggested-restarts rethrow ] recover ;

: fuel-run-file ( path -- )
    [ fuel-set-use-hook run-file ] curry with-scope ; inline

! See http://factorcode.org/license.txt for BSD license.

USING: accessors assocs compiler.units continuations fuel.eval fuel.help
fuel.remote fuel.xref help.topics io.pathnames kernel namespaces parser
sequences tools.scaffold vocabs.loader words ;

IN: fuel

