Skip to content

Niche functionalities

Given I run the following script:

Terminal window
cp $STAK_ROOT/prelude.scm .

And the exit status should be 0.

Given a file named “main.scm” with:

(import (scheme base) (scheme write) (stak backtrace))
(define (foo)
(error "foo")
#f)
(define (bar)
(foo)
#f)
(define (baz)
(bar)
#f)
(let ()
(baz)
#f)

When I run stak main.scm

Then the exit status should be 1

And the stderr should contain “foo”

And the stderr should contain “backtrace: error -> foo -> bar -> baz”.

Given a file named “main.scm” with:

(import (scheme base))
(error "foo" 42)

When I run the following script:

Terminal window
cat prelude.scm main.scm | stak-compile > main.bc

And I run stak-interpret main.bc

Then the exit status should be 1

And the stderr should contain “foo”

And the stderr should contain “unknown”.