-
Notifications
You must be signed in to change notification settings - Fork 347
Haskell Interactive Mode Architecture
Chris Done edited this page May 9, 2014
·
4 revisions
This page is about the architecture of Haskell Interactive Mode, which should be helpful for curious users and prospective hackers.
Your Emacs will contain multiple sessions: one for each Haskell project you're working on. Each session is associated with a connected GHCi process and a REPL buffer.
Emacs
/ \
/ \
Session Session
/ \ / \
Process REPL Process REPL
When you open a Haskell file in a fresh project directory, it will prompt to start a new session for the enclosing directory containing a .cabal file. It will also start a GHCi process and open up an associated REPL buffer.
There is a command queue which all communication with the GHCi process must go through:
Module 1 -> |*|
| |
Module 2 -> |*|
\_/---------> Process
|
Module 3 <--------*--------'
Only one command can run at once, anything else is queued up.
This mode consists of a few modules:
- Sessions: haskell-session.el
- Processes: haskell-process.el
- REPL: haskell-interactive-mode.el