sindre-0.2: A programming language for simple GUIs




Library routines and helper functions for the Sindre programming language.



stdFunctions :: forall im. MonadBackend im => FuncMap imSource

A set of pure functions that can work with any Sindre backend. Includes the functions length, abs, substr, index, match, sub, gsub, tolower, and toupper.

ioFunctions :: forall im. (MonadIO im, MonadBackend im) => FuncMap imSource

A set of impure functions that only work in IO backends. Includes the system function.

ioGlobals :: MonadIO im => Map Identifier (im Value)Source

Global variables that require an IO backend. Includes the ENVIRON global.

class (MonadBackend im, MonadSindre im m) => LiftFunction im m a whereSource

A class making it easy to adapt Haskell functions as Sindre functions that take and return Values.


function :: a -> [Value] -> m im ValueSource

function f is a monadic function that accepts a list of Values and returns a Value. If the list does not contain the number, or type, of arguments expected by f, fail will be called with an appropriate error message.


(Mold a, LiftFunction im m b, MonadSindre im m) => LiftFunction im m (a -> b) 
(Mold a, MonadSindre im m) => LiftFunction im m (m im a) 

class KeyLike a whereSource

Convenience class for writing Chord values.


chord :: [KeyModifier] -> a -> ChordSource

Given a list of modifiers and either a char or a String, yield a Chord. If given a character, the Chord will contain a CharKey, if given a string, it will contain a CtrlKey.