Copyright | (c) Sergey Vinokurov 2018 |
---|---|
License | BSD3-style (see LICENSE) |
Maintainer | serg.foo@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
This module defines the implementation of the MonadEmacs
.
Documentation
Concrete monad for interacting with Emacs. It provides:
- Ability to call Emacs C functions and automatically rethrows any errors (non-local exits) from elisp as Haskell exceptions.
- Tracks ownership of any produced Emacs values and communicates that to Emacs, so that GC on Emacs side will not make any values in Haskell invalid (funnily enough, this can happen!).
Parameter s
serves to make ownership-tracking capabilities possible.
It's use is the same as in ST
monad. That is, it creates
local threads so that no produced Emacs values can leave past runEmacsM
.