biegunka-0.2: DSL definitions, interpreters, templating, git support

Safe HaskellNone

Control.Biegunka.Biegunka

Contents

Synopsis

Wrap/unwrap biegunka interpreters

biegunkaSource

Arguments

:: (Settings () -> Settings ())

User defined settings

-> Interpreter

Combined interpreters

-> Script Sources ()

Script to interpret

-> IO ExitCode 

Entry point into the library

data Interpreter Source

Abstract Interpreter data type

Instances

Monoid Interpreter

Combination of the Default and Semigroup instances

Semigroup Interpreter

Two Interpreters combined take the same script and do things with it one after another

Default Interpreter

Default Interpreter does nothing

interpret :: (Settings () -> Free (Term Annotate Sources) () -> IO ExitCode -> IO ExitCode) -> InterpreterSource

Construct Interpreter

Provides Settings, script and continuation, which is supposed to be called on success to interpreter

interpretOptimistically :: (Settings () -> Free (Term Annotate Sources) () -> IO ()) -> InterpreterSource

Construct Interpreter optimistically

It is optimistic in a sense what it always calls the continuation, provided that no exceptions were thrown

Generic interpreters

pause :: InterpreterSource

Interpreter that just waits user to press any key

confirm :: InterpreterSource

Interpreter that awaits user confirmation

Auxiliary

expandHome :: String -> IO StringSource

Expand "~" at the start of pattern