emacs-module-0.1.1: Utilities to write Emacs dynamic modules

Copyright(c) Sergey Vinokurov 2018
LicenseBSD3-style (see LICENSE)
Maintainerserg.foo@gmail.com
Safe HaskellNone
LanguageHaskell2010

Data.Emacs.Module.Value

Description

 
Synopsis

Documentation

data RawValue Source #

Basic handle on an Emacs value. Can be GC'ed after any call into Emacs. To overcome that, use ValueGC.

Not a real pointer because emacs values are not really pointers. That is, they're completely opaque.

Instances
Storable RawValue Source # 
Instance details

Defined in Data.Emacs.Module.Raw.Value

NFData RawValue Source # 
Instance details

Defined in Data.Emacs.Module.Raw.Value

Methods

rnf :: RawValue -> () #

data Value s Source #

Value that is independent of environment (Env) that produced it. Incidentally, this implies that it's "protected" against Emacs GC and thus will not unexpectedly go out of scope.

In order to prevent memory leaks, value is registered in the Emacs monad than produced it and will be freed when the monad finishes. To make the connection clear the value is tagged with parameter s, which serves the same purpose as tag of the ST monad. That is, it ensures that value cannot leave the scope of the monad that produced it.

Constructors

Value 

Fields

Instances
Generic (Value s) Source # 
Instance details

Defined in Data.Emacs.Module.Value.Internal

Associated Types

type Rep (Value s) :: * -> * #

Methods

from :: Value s -> Rep (Value s) x #

to :: Rep (Value s) x -> Value s #

NFData (Value s) Source # 
Instance details

Defined in Data.Emacs.Module.Value.Internal

Methods

rnf :: Value s -> () #

type Rep (Value s) Source # 
Instance details

Defined in Data.Emacs.Module.Value.Internal

type Rep (Value s)