shaker-0.5.1: simple and interactive command-line build tool

Shaker.Type

Contents

Description

Aggregate all types and data used through shaker

Synopsis

Documentation

type Shaker = ReaderT ShakerInputSource

Environnement containing the project configuration. It is generated at startup and won't change

type CurrentFiles = MVar [FileInfo]Source

MVar used to store currentFiles listed

type MvModifiedFiles = MVar [FileInfo]Source

MVar used to store modifiedFiles since the last check

type Job = MVar [FileListenInfo]Source

MVar used to pass action to the fileListenInfoDirectory scanner

type CompileM = Reader CompileInputSource

Environnement for the project compilation This environnement can change depending on the compile action called

data ListenState Source

Agregate all information of listener

Constructors

ListenState 

Fields

currentFiles :: CurrentFiles

Files found in the last check

mvModifiedFiles :: MvModifiedFiles

Differences between last and before last check

threadIds :: [ThreadId]

List of all forks id initialized

data Duration Source

Duration define the life span of an action

Constructors

OneShot

Execute the action and give back control

Continuous

Execute the action when a source file modification is done until it is stopped

Instances

data Action Source

Action represents the differents action with arguments

Instances

type InputCommand = MVar (Maybe Command)Source

The input mvar is used to push the parsed command

data InputState Source

Constructors

InputState 

Fields

shakerInputStateCommand :: InputCommand
 
shakerInputStateToken :: Token

Token is used to manage the token between action executor and command-line listener

data ShakerAction Source

ShakerAction represents the differents actions realisable by shaker

Constructors

Compile

Compile sources with ghc

FullCompile

Compile all hs sources with ghc

TestFramework

Execute both quickcheck and hunit using test framework

ModuleTestFramework

Execute both quickcheck and hunit using test framework with module filtering

IntelligentTestFramework

Execute both quickcheck and hunit using test framework on recompiled modules

IntelligentModuleTestFramework

Execute both quickcheck and hunit using test framework on recompiled modules

InvalidAction

Display an error when invalid action is inputed

Help

Display the help

Execute

Execute a command

Empty

Nothing to execute

Quit

Exit shaker

Clean

Delete generated

data Command Source

Command agregate a duration with an action

Constructors

Command Duration [Action] 

Instances

data Verbosity Source

Constructors

Silent 
Debug 

data CompileInput Source

Configuration flags to pass to the ghc compiler

Constructors

CompileInput 

Fields

compileInputSourceDirs :: [String]

Source fileListenInfoDirectory of haskell files

compileInputBuildDirectory :: String

Destination of .o and .hi files

compileInputDynFlags :: DynFlags -> DynFlags

A transform fonction wich will takes the DynFlags of the current ghc session and change some values

compileInputCommandLineFlags :: [String]

The command line to pass options to pass to the ghc compiler

compileInputTargetFiles :: [String]

List of files or list of modules to compile

Instances

Show CompileInput 
Monoid CompileInput

Default compilation shakerArgument. Wall is activated by default

data ListenerInput Source

Configuration of the continuous listener

Constructors

ListenerInput 

Fields

listenerInputFiles :: [FileListenInfo]

The files to listen

listenerInputDelay :: Int

Delay beetween 2 check in microsecond

Instances

Monoid ListenerInput

The default Listener configuration Listened sources are all haskell sources in . The default listenerInputDelay is 2 sec

data FileListenInfo Source

Represents fileListenInfoDirectory to listen

Constructors

FileListenInfo 

Fields

fileListenInfoDir :: FilePath

location of the listened fileListenInfoDirectory

fileListenInfoIgnore :: [String]

fileListenInfoIgnore patterns

fileListenInfoInclude :: [String]

fileListenInfoInclude patterns

data FileInfo Source

Agregate a FilePath with its modification time

Instances

type PluginMap = Map ShakerAction PluginSource

Represents the mapping beetween an action and the function to execute

type CommandMap = Map String ShakerActionSource

Represents the mapping between the command-line input and the action

type Plugin = Shaker IO ()Source

Represents an action of shaker

Default data

defaultCompileFlags :: DynFlags -> DynFlagsSource

default dynamics flags the sources are expected to be in src as described in http://www.haskell.org/haskellwiki/structure_of_a_haskell_project the result of compilation (.o and .hi) are placed in the dist/shakerTarget there is no main linkage by default to allow faster compilation feedback

defaultHaskellPatterns :: [String]Source

Default haskell file pattern : *.hs

defaultExclude :: [String]Source

Default exclude pattern : Setup.hs