Skip to content

Trace with names instead of lambda #5

@Machine-Jonte

Description

@Machine-Jonte

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions