Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Safe HaskellNone

Cmd.Repl

Description

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?

Synopsis

Documentation

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.