language-ninja-0.2.0: A library for dealing with the Ninja build language.

CopyrightCopyright 2017 Awake Security
LicenseApache-2.0
Maintaineropensource@awakesecurity.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Language.Ninja.AST.Build

Contents

Description

This module contains a type representing a build declaration in the parsed Ninja AST, along with any supporting or related types.

Since: 0.1.0

Synopsis

Build

data Build ann Source #

A parsed Ninja build declaration.

Since: 0.1.0

Instances

Functor Build Source # 

Methods

fmap :: (a -> b) -> Build a -> Build b #

(<$) :: a -> Build b -> Build a #

Foldable Build Source # 

Methods

fold :: Monoid m => Build m -> m #

foldMap :: Monoid m => (a -> m) -> Build a -> m #

foldr :: (a -> b -> b) -> b -> Build a -> b #

foldr' :: (a -> b -> b) -> b -> Build a -> b #

foldl :: (b -> a -> b) -> b -> Build a -> b #

foldl' :: (b -> a -> b) -> b -> Build a -> b #

foldr1 :: (a -> a -> a) -> Build a -> a #

foldl1 :: (a -> a -> a) -> Build a -> a #

toList :: Build a -> [a] #

null :: Build a -> Bool #

length :: Build a -> Int #

elem :: Eq a => a -> Build a -> Bool #

maximum :: Ord a => Build a -> a #

minimum :: Ord a => Build a -> a #

sum :: Num a => Build a -> a #

product :: Num a => Build a -> a #

Traversable Build Source # 

Methods

traverse :: Applicative f => (a -> f b) -> Build a -> f (Build b) #

sequenceA :: Applicative f => Build (f a) -> f (Build a) #

mapM :: Monad m => (a -> m b) -> Build a -> m (Build b) #

sequence :: Monad m => Build (m a) -> m (Build a) #

Annotated Build Source #

The usual definition for Annotated.

Since: 0.1.0

Methods

annotation' :: (ann -> ann') -> Lens (Build ann) (Build ann') ann ann' Source #

(Monad m, BuildConstraint (Serial m) ann) => Serial m (Build ann) Source #

Default Serial instance via Generic.

Since: 0.1.0

Methods

series :: Series m (Build ann) #

(Monad m, BuildConstraint (CoSerial m) ann) => CoSerial m (Build ann) Source #

Default CoSerial instance via Generic.

Since: 0.1.0

Methods

coseries :: Series m b -> Series m (Build ann -> b) #

Eq ann => Eq (Build ann) Source # 

Methods

(==) :: Build ann -> Build ann -> Bool #

(/=) :: Build ann -> Build ann -> Bool #

Show ann => Show (Build ann) Source # 

Methods

showsPrec :: Int -> Build ann -> ShowS #

show :: Build ann -> String #

showList :: [Build ann] -> ShowS #

Generic (Build ann) Source # 

Associated Types

type Rep (Build ann) :: * -> * #

Methods

from :: Build ann -> Rep (Build ann) x #

to :: Rep (Build ann) x -> Build ann #

(Arbitrary ann, BuildConstraint Arbitrary ann) => Arbitrary (Build ann) Source #

Reasonable Arbitrary instance for Build.

Since: 0.2.0

Methods

arbitrary :: Gen (Build ann) #

shrink :: Build ann -> [Build ann] #

Hashable ann => Hashable (Build ann) Source #

Default Hashable instance via Generic.

Since: 0.1.0

Methods

hashWithSalt :: Int -> Build ann -> Int #

hash :: Build ann -> Int #

ToJSON ann => ToJSON (Build ann) Source #

Converts to {ann: …, rule: …, env: …, deps: …, bind: …}.

Since: 0.1.0

Methods

toJSON :: Build ann -> Value #

toEncoding :: Build ann -> Encoding #

toJSONList :: [Build ann] -> Value #

toEncodingList :: [Build ann] -> Encoding #

FromJSON ann => FromJSON (Build ann) Source #

Inverse of the ToJSON instance.

Since: 0.1.0

Methods

parseJSON :: Value -> Parser (Build ann) #

parseJSONList :: Value -> Parser [Build ann] #

NFData ann => NFData (Build ann) Source #

Default NFData instance via Generic.

Since: 0.1.0

Methods

rnf :: Build ann -> () #

type Rep (Build ann) Source # 
type Rep (Build ann) = D1 (MetaData "Build" "Language.Ninja.AST.Build" "language-ninja-0.2.0-4aVVODOvkNMFxGcRpnztag" False) (C1 (MetaCons "MkBuild" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_buildAnn") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ann)) (S1 (MetaSel (Just Symbol "_buildRule") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 Text))) ((:*:) (S1 (MetaSel (Just Symbol "_buildEnv") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Env Text Text))) ((:*:) (S1 (MetaSel (Just Symbol "_buildDeps") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Deps ann))) (S1 (MetaSel (Just Symbol "_buildBind") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (HashMap Text Text)))))))

makeBuild Source #

Arguments

:: Monoid ann 
=> Text

The rule name

-> Env Text Text

The environment

-> Build ann 

Construct a Build with all default values.

Since: 0.1.0

buildRule :: Lens' (Build ann) Text Source #

A lens into the rule name associated with a Build.

Since: 0.1.0

buildEnv :: Lens' (Build ann) (Env Text Text) Source #

A lens into the environment associated with a Build.

Since: 0.1.0

buildDeps :: Lens' (Build ann) (Deps ann) Source #

A lens into the dependencies associated with a Build.

Since: 0.1.0

buildBind :: Lens' (Build ann) (HashMap Text Text) Source #

A lens into the bindings associated with a Build.

Since: 0.1.0

type BuildConstraint c ann = (DepsConstraint c ann, c Text, c (HashMap Text Text), c (Maps Text Text), c ann) Source #

The set of constraints required for a given constraint to be automatically computed for a Build.

Since: 0.1.0