         [ restarts>> fuel-pop-restarts ] tri
     ] unless ;
 
-: fuel-forget-error ( -- ) f error set-global ; inline
-: fuel-forget-result ( -- ) f fuel-eval-result set-global ; inline
-: fuel-forget-output ( -- ) f fuel-eval-output set-global ; inline
+: fuel-forget-error ( -- ) f error set-global ;
+: fuel-forget-result ( -- ) f fuel-eval-result set-global ;
+: fuel-forget-output ( -- ) f fuel-eval-output set-global ;
 : fuel-forget-status ( -- )
-    fuel-forget-error fuel-forget-result fuel-forget-output ; inline
+    fuel-forget-error fuel-forget-result fuel-forget-output ;
 
 : fuel-send-retort ( -- )
     error get fuel-eval-result get-global fuel-eval-output get-global
     3array fuel-pprint flush nl "<~FUEL~>" write nl flush ;
 
 : (fuel-begin-eval) ( -- )
-    fuel-push-status fuel-forget-status ; inline
+    fuel-push-status fuel-forget-status ;
 
 : (fuel-end-eval) ( output -- )
-    fuel-eval-output set-global fuel-send-retort fuel-pop-status ; inline
+    fuel-eval-output set-global fuel-send-retort fuel-pop-status ;
 
-: (fuel-eval) ( string -- )
-    '[ _ eval( -- ) ] try ;
+: (fuel-eval) ( lines -- )
+    [ [ parse-lines ] with-compilation-unit call( -- ) ] curry
+    [ print-error ] recover ;
 
 : (fuel-eval-each) ( lines -- )
     [ (fuel-eval) ] each ;

! See http://factorcode.org/license.txt for BSD license.
USING: accessors arrays compiler.units continuations debugger
fuel.pprint io io.streams.string kernel namespaces parser sequences
vectors vocabs.parser eval fry ;

IN: fuel.eval


t fuel-eval-res-flag set-global

: fuel-eval-restartable? ( -- ? )
    fuel-eval-res-flag get-global ;

: fuel-push-status ( -- )
    in get use get clone restarts get-global clone
