kanaka / mal

mal - Make a Lisp
Other
10k stars 2.53k forks source link

mal: error reporting, procedural env_set, native macro? #607

Closed asarhaddon closed 4 weeks ago

asarhaddon commented 2 years ago

Hello. This merge request contains 3 commits implementing three ideas, and a backport from #592. The suggestions are interconnected, so a single merge request is convenient for now to start discussion and list implementations for which apply refuses macros.

asarhaddon commented 2 years ago

elm fails because the Docker image needs to be updated (#608), but Types.elm suggests that Core.elm/apply accepts macros. Implementations for which core/apply refuses macro arguments: erlang fsharp haskell nasm prolog sml vimscript

592 should probably be completed first in order to avoid non-trivial rebase work.

asarhaddon commented 2 years ago

I have rebased on #592 because rebasing was a nightmare. Apparently, all failures related to this merge request are fixed.

kanaka commented 4 weeks ago

Looks good. Definitely good to have (apply macro ...) working for all implementations. Regarding the mal error checking, I've been torn between adding those or keeping the mal implementation as concise as possible. There are pedagogical reasons for both approaches. But I think I prefer error checking now. Thanks!