HERMIT Shell Client Server Architecture - ku-fpg/hermit-shell GitHub Wiki
We set up the shell as a GHCi client, talking to a HERMIT server, that is a GHC plugin.
Shutdown
This shutdown is tricky, because GHCi is not designed to be shut down from the prompt.
:abort
This shuts down the shell and the server cleanly, without completing compilation.
The order is
- User types
:abort - This sends
abortto the server, which remembers we are to abort - The message is
{"params":[],"method":"abort"} - This server returns
{"result":[]}. (or Haskell()`) - The client receives the reply, then shuts down.
- The server sees the termination of GHCi, and does the abort
:resume
Same as above, but remembers that we are to resume using a specific AST instance.