paulstansifer / unseemly

Macros have types!
http://unseemly.github.io/
MIT License
131 stars 5 forks source link

Support multi-file programs #21

Closed paulstansifer closed 3 years ago

paulstansifer commented 5 years ago

Ideally, we should have a simple primitive out of which "import this module in another file" can be built; then we can start writing a standard library.

paulstansifer commented 3 years ago

I think that we need to add two constructs to the core language for this; one that selects a bunch of stuff to be exported (it will be the outermost construct in a library file), and one that names a file and evaluates it, importing all of its contents (eventually, filtered import would be needed; maybe that could be a macro?).

The included file will be evaluated in the core language (or, after #39, in the language specified by its file extension).

Using serialization to cache the results of evaluating libraries seems prudent, if possible.

paulstansifer commented 3 years ago

Fixed, as of 5d720.