Open endlessoblivion opened 7 years ago
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
While using the REPL, each expression is recorded and replayed whenever a new expression is entered, the final value being the one that is printed out. This allows doing stuff like
> import MyModule exposing (foo)
> foo "bar"
-- notice a bug, go fix it in code
> foo "bar"
-- ahh, all good.
Since a huge nested expression like the one you typed takes some time to compile and evaluate, every subsequent expression also needs to spend that time.
Note that you can reset the environment (hence clearing out the recorded history) using :reset
.
Well, that explains the apparent behaviour, and while I understand the "hot-fix propagation" reasoning behind that, it still seems to deviate from the least surprise principle, i.e. what is reasonably expected from any REPL.
Indeed, I'd rather issue a (hypothetical) :replay
command explicitly, while having the runtime context be kept in memory all along by default instead. But that's of course a highly subjective POV.
After defining a sequence of functions like:
all following expressions take a long time (20-60 seconds) to complete:
[Elm 0.18 / ubuntu]