Karya, built on 2018-05-31T02:46:59 (patch 0a1a35479c514820d77330ae8a978975ba22a47a)

Safe HaskellNone



Process a textual language, which may look familiar, to perform UI state changes.

The incoming commands are received via Msg.Socket msgs.

TODO currently this will reload any updated modules as interpreted. While I want to do this for explicitly named modules (Cmd.Repl.Environ and LocalRepl *.hs), it's just annoying and brittle when applied to the main src files. Is there a way to get ghc to load the objects even if the source files are newer?



with_socket :: (Socket -> IO.IO a) -> IO.IO a Source #

Acquire a new unix socket, and delete when done.

This tries to find an unused socket name. It might seem like overkill, but the previous strategy of unconditionally deleting and recreating the single socket meant that accidentally starting the app twice in the same directory would make the first one unreachable.

type Session = ReplImpl.Session Source #

This is the persistent interpreter session which is stored in the global state.

interpreter :: Session -> IO.IO () Source #

This is the interpreter thread, which should be started when the app starts. It's in a separate thread so it can run in its own monad.