Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trace with names instead of lambda #5

Open
Machine-Jonte opened this issue Jun 7, 2023 · 0 comments
Open

Trace with names instead of lambda #5

Machine-Jonte opened this issue Jun 7, 2023 · 0 comments

Comments

@Machine-Jonte
Copy link

Hi!

First, thanks super much for this awesome open-source implementation of Scheme!

I do wonder about the stack trace. With functions defined outside of the implementation, the names of the functions are not known. Is there a way that you know how to extend this repo to support Scheme defined function names? e.g. I would like an error message to go from:

> (define (f a b) (+ a b))
> (f 3 "hej")
error: invalid argument for +: expected number, but got hej
trace: 
        (+)
        (λ (a b))
        (λ)

to

> (define (f a b) (+ a b))
> (f 3 "hej")
error: invalid argument for +: expected number, but got hej
trace: 
        (+)
        (f (a b))
        (...? <-- Unsure about this guy)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant