yi-0.8.1: The Haskell-Scriptable Editor

Safe HaskellNone




Nonserializable ("config") dynamics

class (Default a, Typeable a) => YiConfigVariable a Source

Class of values that can go in a ConfigDynamic or a ConfigDynamicValues. These will typically go in a Config. As the Config has no mutable state, there is no need to serialize these values: if needed, they will be set in the user's configuration file. The Default constraint ensures that, even if the user hasn't customised this config variable, a value is stil available.

data ConfigVariables Source

An "extensible record" of YiConfigVariables. Can be constructed and accessed with def and configVariableA.

This type can be thought of as a record containing all YiConfigVariables in existence.

configVariableA :: forall a f. (YiConfigVariable a, Functor f) => (a -> f a) -> ConfigVariables -> f ConfigVariables Source

Accessor for any YiConfigVariable. Neither reader nor writer can fail: if the user's config file hasn't set a value for a YiConfigVariable, then the default value is used.

Serializable dynamics

class (Default a, Binary a, Typeable a) => YiVariable a Source

Class of values that can go in a Dynamic or a DynamicValues. These are typically for storing custom state in a FBuffer or an Editor.

data DynamicValues Source

An extensible record, indexed by type.

dynamicValueA :: forall a f. (YiVariable a, Functor f) => (a -> f a) -> DynamicValues -> f DynamicValues Source

Accessor for a dynamic component. If the component is not found, the value def is used.