Skip to content
Snippets Groups Projects
Commit 2a66eb15 authored by Matthew Pickering's avatar Matthew Pickering
Browse files

ghci: Force bytecode to be evaluated after loading

Behaviour before: Bytecode is forced when you need it to evaluate an
expression in the interpreter.

Behaviour after: Bytecode is forced in parallel, in the background, after
the initial load is completed.

The goal is to increase percieved responsiveness of the interpreter
after a reload. If you do a reload and at a later point perform
evaluation, now the evaluation will start immediately, rather than
waiting first for all the byte code to be compiled.

Since the bytecode is evaluated in the background, the prompt can still
be used like normal to evaluate expressions or perform other queries.

The thunks are evaluated in parallel by creating a spark for each thunk,
thus if another reload is perfomed then the sparks will be discarded as
the thunks in question will no longer be evaluated.
parent bf8c7d6e
No related branches found
No related tags found
No related merge requests found
Pipeline #106302 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment