Skip to content

HERMIT Shell Client Server Architecture

Andy Gill edited this page Jun 11, 2015 · 3 revisions

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 abort to 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.

Clone this wiki locally