Skip to content

[BUG] can't use eval-string with map #525

Description

@IllustratedMan-code

To reproduce

Just run something like this in the repl

(map eval-string '("(+ 1 2 3)"))

Outputs

Unable to locate source and span information for this error: Error: TypeMismatch: map expected a function

eval also gives the same error.

However, eval! works

I'm using the latest master which is e387a1f at the time of writing.

For context, I'm trying to implement string interpolation, i.e. (interpolate "this is an interpolated string ${(+ 1 2 3)})". I also tried calling Engine::run from within a rust function, which resulted in some strange errors (if interested, IllustratedMan-code/piphany@0636082) is the commit where I tried to implement interpolation from rust. It almost worked, except the strings can't get the context of the outside expressions. You can see the error by doing a cargo run. Any tips on how I should go about this would be greatly appreciated!

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