milkshake-0.1.0.0: Minimal build system combining Dhall, Shake and FSNotify.
Safe HaskellNone
LanguageHaskell2010

Milkshake.Data

Description

This submodule contains all type definitions and Dhall counterparts.

Synopsis

Documentation

data Virtual #

A virtual target is one that is not backed up by a file, but rather by something that could be a file. One example would be an entry in an sqlite database. This may be a future feature.

Constructors

Virtual 

Fields

Instances

Instances details
Eq Virtual # 
Instance details

Defined in Milkshake.Data

Methods

(==) :: Virtual -> Virtual -> Bool #

(/=) :: Virtual -> Virtual -> Bool #

Show Virtual # 
Instance details

Defined in Milkshake.Data

Generic Virtual # 
Instance details

Defined in Milkshake.Data

Associated Types

type Rep Virtual :: Type -> Type #

Methods

from :: Virtual -> Rep Virtual x #

to :: Rep Virtual x -> Virtual #

FromDhall Virtual # 
Instance details

Defined in Milkshake.Data

Methods

autoWith :: InputNormalizer -> Decoder Virtual

ToDhall Virtual # 
Instance details

Defined in Milkshake.Data

Methods

injectWith :: InputNormalizer -> Encoder Virtual

type Rep Virtual # 
Instance details

Defined in Milkshake.Data

type Rep Virtual = D1 ('MetaData "Virtual" "Milkshake.Data" "milkshake-0.1.0.0-inplace" 'False) (C1 ('MetaCons "Virtual" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "exists") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "content") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))))

data Target #

A target is either a file, some virtual content, or a phony target.

Constructors

File Text 
Generic Virtual 
Phony Text 

Instances

Instances details
Eq Target # 
Instance details

Defined in Milkshake.Data

Methods

(==) :: Target -> Target -> Bool #

(/=) :: Target -> Target -> Bool #

Show Target # 
Instance details

Defined in Milkshake.Data

Generic Target # 
Instance details

Defined in Milkshake.Data

Associated Types

type Rep Target :: Type -> Type #

Methods

from :: Target -> Rep Target x #

to :: Rep Target x -> Target #

FromDhall Target # 
Instance details

Defined in Milkshake.Data

Methods

autoWith :: InputNormalizer -> Decoder Target

ToDhall Target # 
Instance details

Defined in Milkshake.Data

Methods

injectWith :: InputNormalizer -> Encoder Target

type Rep Target # 
Instance details

Defined in Milkshake.Data

data Action #

An Action is a node in our workflow.

Constructors

Action 

Fields

Instances

Instances details
Show Action # 
Instance details

Defined in Milkshake.Data

Generic Action # 
Instance details

Defined in Milkshake.Data

Associated Types

type Rep Action :: Type -> Type #

Methods

from :: Action -> Rep Action x #

to :: Rep Action x -> Action #

FromDhall Action # 
Instance details

Defined in Milkshake.Data

Methods

autoWith :: InputNormalizer -> Decoder Action

type Rep Action # 
Instance details

Defined in Milkshake.Data

type Rep Action = D1 ('MetaData "Action" "Milkshake.Data" "milkshake-0.1.0.0-inplace" 'False) (C1 ('MetaCons "Action" 'PrefixI 'True) (S1 ('MetaSel ('Just "target") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Target]) :*: (S1 ('MetaSel ('Just "dependency") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Target]) :*: S1 ('MetaSel ('Just "script") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe Text)))))

type Generator = [Target] -> [Target] -> Maybe Text #

Function type for generating a script to convert a Rule into a specific Target.

data Rule #

A Rule is a parametric Action. Given a list of targets and dependencies, the generator creates the corresponding script.

Constructors

Rule 

Fields

Instances

Instances details
Generic Rule # 
Instance details

Defined in Milkshake.Data

Associated Types

type Rep Rule :: Type -> Type #

Methods

from :: Rule -> Rep Rule x #

to :: Rep Rule x -> Rule #

FromDhall Rule # 
Instance details

Defined in Milkshake.Data

Methods

autoWith :: InputNormalizer -> Decoder Rule

type Rep Rule # 
Instance details

Defined in Milkshake.Data

type Rep Rule = D1 ('MetaData "Rule" "Milkshake.Data" "milkshake-0.1.0.0-inplace" 'False) (C1 ('MetaCons "Rule" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: S1 ('MetaSel ('Just "gen") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Generator)))

data Call #

The Call is like a function call, where the Rule is the function and $sel:target:Action and dependecy are the arguments.

Constructors

Call 

Fields

Instances

Instances details
Show Call # 
Instance details

Defined in Milkshake.Data

Methods

showsPrec :: Int -> Call -> ShowS #

show :: Call -> String #

showList :: [Call] -> ShowS #

Generic Call # 
Instance details

Defined in Milkshake.Data

Associated Types

type Rep Call :: Type -> Type #

Methods

from :: Call -> Rep Call x #

to :: Rep Call x -> Call #

FromDhall Call # 
Instance details

Defined in Milkshake.Data

Methods

autoWith :: InputNormalizer -> Decoder Call

type Rep Call # 
Instance details

Defined in Milkshake.Data

type Rep Call = D1 ('MetaData "Call" "Milkshake.Data" "milkshake-0.1.0.0-inplace" 'False) (C1 ('MetaCons "Call" 'PrefixI 'True) (S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text) :*: (S1 ('MetaSel ('Just "target") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Target]) :*: S1 ('MetaSel ('Just "dependency") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Target]))))

data Stmt #

The Milkshake script is an unordered list of statements. The Stmt type encodes statements in a Milkshake script.

stmt :: Decoder Stmt #

To decode a list of Milkshake statements from the Dhall configuration use this decoder.

>>> input (list stmt) "(entangled.dhall).milkshake"

readStmts :: MonadIO m => FilePath -> m [Stmt] #

Read a list of statements from a script.

data Config #

Transposed data record of a list of Stmt.

Constructors

Config 

Instances

Instances details
Generic Config # 
Instance details

Defined in Milkshake.Data

Associated Types

type Rep Config :: Type -> Type #

Methods

from :: Config -> Rep Config x #

to :: Rep Config x -> Config #

Semigroup Config # 
Instance details

Defined in Milkshake.Data

Monoid Config # 
Instance details

Defined in Milkshake.Data

type Rep Config # 
Instance details

Defined in Milkshake.Data

stmtsToConfig :: [Stmt] -> Config #

Groups a list of Stmt into a Config record.

readConfig :: MonadIO m => FilePath -> m Config #

Read a script directly to Config record.

data Watch #

A Watch is used to keep targets up-to-date when source files change.

Constructors

Watch 

Fields

Instances

Instances details
Generic Watch # 
Instance details

Defined in Milkshake.Data

Associated Types

type Rep Watch :: Type -> Type #

Methods

from :: Watch -> Rep Watch x #

to :: Rep Watch x -> Watch #

FromDhall Watch # 
Instance details

Defined in Milkshake.Data

Methods

autoWith :: InputNormalizer -> Decoder Watch

type Rep Watch # 
Instance details

Defined in Milkshake.Data

type Rep Watch = D1 ('MetaData "Watch" "Milkshake.Data" "milkshake-0.1.0.0-inplace" 'False) (C1 ('MetaCons "Watch" 'PrefixI 'True) (S1 ('MetaSel ('Just "paths") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Text]) :*: S1 ('MetaSel ('Just "target") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Target)))