amuletml / amulet

An ML-like functional programming language
https://amulet.works/
BSD 3-Clause "New" or "Revised" License
328 stars 16 forks source link

Module caching #211

Closed SquidDev closed 5 years ago

SquidDev commented 5 years ago

This implements the design as discussed in #183:

It's worth noting that the REPL is still a little slow to run after each :r, as we still need to emit and run the appropriate Lua code, which takes a bit of time. It might be possible to defer the running of non-critical Lua code, but doing so is a much harder challenge.

Edit: Actually, it's not as bad as I thought it was - just tried it outside of ghci, and the performance is fine, so it probably isn't down to Lua.