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

CopyrightCopyright 2011-2017 Neil Mitchell
LicenseBSD3
Maintaineropensource@awakesecurity.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Language.Ninja.Lexer

Contents

Description

Lexing is a slow point, the code below is optimised.

Since: 0.1.0

Synopsis

lex*IO

lexFileIO :: Path -> IO [Lexeme Ann] Source #

Lex the file at the given path. This function may throw an exception if parsing fails.

Since: 0.1.0

lexTextIO :: Text -> IO [Lexeme Ann] Source #

Lex the given Text. This function may throw an exception if parsing fails.

Since: 0.1.0

lexBSIO :: ByteString -> IO [Lexeme Ann] Source #

Lex the given ByteString. This function may throw an exception if parsing fails.

Since: 0.1.0

lex*

lexFile :: (MonadError ParseError m, MonadReadFile m) => Path -> m [Lexeme Ann] Source #

Lex the given file.

Since: 0.1.0

lexText :: MonadError ParseError m => Text -> m [Lexeme Ann] Source #

Lex the given Text.

Since: 0.1.0

lexBS :: MonadError ParseError m => ByteString -> m [Lexeme Ann] Source #

Lex the given ByteString.

Since: 0.1.0

lex*WithPath

lexTextWithPath :: MonadError ParseError m => Maybe Path -> Text -> m [Lexeme Ann] Source #

Lex the given Text that comes from the given Path, if provided.

Since: 0.1.0

lexBSWithPath :: MonadError ParseError m => Maybe Path -> ByteString -> m [Lexeme Ann] Source #

Lex the given ByteString that comes from the given Path, if it is provided. The Path is only used for error messages.

Since: 0.1.0

Other ways of running the lexer

lexemesP :: Parser m [Lexeme Ann] Source #

The megaparsec parser for a Ninja file.

Since: 0.1.0

Type aliases

type Parser m a = ParsecT Dec Text m a Source #

A megaparsec parser.

Since: 0.1.0

type Ann = Spans Source #

The type of annotations returned by the lexer.

Since: 0.1.0

Lexeme and friends

data Lexeme ann Source #

Lex each line separately, rather than each lexeme.

Since: 0.1.0

Constructors

LexDefine !ann !(LBind ann)
foo = bar

Since: 0.1.0

LexBind !ann !(LBind ann)
[indent]foo = bar

Since: 0.1.0

LexInclude !ann !(LFile ann)
include file

Since: 0.1.0

LexSubninja !ann !(LFile ann)
subninja file

Since: 0.1.0

LexBuild !ann !(LBuild ann)
build foo: bar | baz || qux

Since: 0.1.0

LexRule !ann !(LName ann)
rule name

Since: 0.1.0

LexPool !ann !(LName ann)
pool name

Since: 0.1.0

LexDefault !ann ![Expr ann]
default foo bar

Since: 0.1.0

Instances

Functor Lexeme Source # 

Methods

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

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

Foldable Lexeme Source # 

Methods

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

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

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

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

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

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

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

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

toList :: Lexeme a -> [a] #

null :: Lexeme a -> Bool #

length :: Lexeme a -> Int #

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

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

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

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

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

Traversable Lexeme Source # 

Methods

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

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

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

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

Annotated Lexeme Source #

The usual definition for Annotated.

Since: 0.1.0

Methods

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

(Monad m, LexemeConstraint (Serial m) ann) => Serial m (Lexeme ann) Source #

Default Serial instance via Generic.

Since: 0.1.0

Methods

series :: Series m (Lexeme ann) #

(Monad m, LexemeConstraint (CoSerial m) ann) => CoSerial m (Lexeme ann) Source #

Default CoSerial instance via Generic.

Since: 0.1.0

Methods

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

Eq ann => Eq (Lexeme ann) Source # 

Methods

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

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

Show ann => Show (Lexeme ann) Source # 

Methods

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

show :: Lexeme ann -> String #

showList :: [Lexeme ann] -> ShowS #

Generic (Lexeme ann) Source # 

Associated Types

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

Methods

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

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

Hashable ann => Hashable (Lexeme ann) Source #

Default Hashable instance via Generic.

Since: 0.1.0

Methods

hashWithSalt :: Int -> Lexeme ann -> Int #

hash :: Lexeme ann -> Int #

ToJSON ann => ToJSON (Lexeme ann) Source #

Converts to {ann: …, tag: …, value: …}.

Since: 0.1.0

Methods

toJSON :: Lexeme ann -> Value #

toEncoding :: Lexeme ann -> Encoding #

toJSONList :: [Lexeme ann] -> Value #

toEncodingList :: [Lexeme ann] -> Encoding #

FromJSON ann => FromJSON (Lexeme ann) Source #

Inverse of the ToJSON instance.

Since: 0.1.0

Methods

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

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

NFData ann => NFData (Lexeme ann) Source #

Default NFData instance via Generic.

Since: 0.1.0

Methods

rnf :: Lexeme ann -> () #

type Rep (Lexeme ann) Source # 
type Rep (Lexeme ann) = D1 (MetaData "Lexeme" "Language.Ninja.Lexer.Types" "language-ninja-0.2.0-4aVVODOvkNMFxGcRpnztag" False) ((:+:) ((:+:) ((:+:) (C1 (MetaCons "LexDefine" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ann)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (LBind ann))))) (C1 (MetaCons "LexBind" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ann)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (LBind ann)))))) ((:+:) (C1 (MetaCons "LexInclude" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ann)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (LFile ann))))) (C1 (MetaCons "LexSubninja" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ann)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (LFile ann))))))) ((:+:) ((:+:) (C1 (MetaCons "LexBuild" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ann)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (LBuild ann))))) (C1 (MetaCons "LexRule" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ann)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (LName ann)))))) ((:+:) (C1 (MetaCons "LexPool" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ann)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (LName ann))))) (C1 (MetaCons "LexDefault" PrefixI False) ((:*:) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ann)) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [Expr ann])))))))

data LName ann Source #

The name of a Ninja rule or pool.

Since: 0.1.0

Constructors

MkLName 

Fields

Instances

Functor LName Source # 

Methods

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

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

Foldable LName Source # 

Methods

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

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

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

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

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

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

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

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

toList :: LName a -> [a] #

null :: LName a -> Bool #

length :: LName a -> Int #

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

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

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

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

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

Traversable LName Source # 

Methods

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

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

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

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

Annotated LName Source #

The usual definition for Annotated.

Since: 0.1.0

Methods

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

(Monad m, LNameConstraint (Serial m) ann) => Serial m (LName ann) Source #

Uses the underlying Serial instances.

Since: 0.1.0

Methods

series :: Series m (LName ann) #

(Monad m, LNameConstraint (CoSerial m) ann) => CoSerial m (LName ann) Source #

Default CoSerial instance via Generic.

Since: 0.1.0

Methods

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

Eq ann => Eq (LName ann) Source # 

Methods

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

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

Show ann => Show (LName ann) Source # 

Methods

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

show :: LName ann -> String #

showList :: [LName ann] -> ShowS #

Generic (LName ann) Source # 

Associated Types

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

Methods

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

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

Hashable ann => Hashable (LName ann) Source #

Default Hashable instance via Generic.

Since: 0.1.0

Methods

hashWithSalt :: Int -> LName ann -> Int #

hash :: LName ann -> Int #

ToJSON ann => ToJSON (LName ann) Source #

Converts to {ann: …, name: …}.

Since: 0.1.0

Methods

toJSON :: LName ann -> Value #

toEncoding :: LName ann -> Encoding #

toJSONList :: [LName ann] -> Value #

toEncodingList :: [LName ann] -> Encoding #

FromJSON ann => FromJSON (LName ann) Source #

Inverse of the ToJSON instance.

Since: 0.1.0

Methods

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

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

NFData ann => NFData (LName ann) Source #

Default NFData instance via Generic.

Since: 0.1.0

Methods

rnf :: LName ann -> () #

type Rep (LName ann) Source # 
type Rep (LName ann) = D1 (MetaData "LName" "Language.Ninja.Lexer.Types" "language-ninja-0.2.0-4aVVODOvkNMFxGcRpnztag" False) (C1 (MetaCons "MkLName" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_lnameAnn") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ann)) (S1 (MetaSel (Just Symbol "_lnameBS") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ByteString))))

newtype LFile ann Source #

A reference to a file in an include or subninja declaration.

Since: 0.1.0

Constructors

MkLFile 

Fields

Instances

Functor LFile Source # 

Methods

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

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

Foldable LFile Source # 

Methods

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

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

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

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

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

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

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

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

toList :: LFile a -> [a] #

null :: LFile a -> Bool #

length :: LFile a -> Int #

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

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

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

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

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

Traversable LFile Source # 

Methods

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

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

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

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

(Monad m, LFileConstraint (Serial m) ann) => Serial m (LFile ann) Source #

Default Serial instance via Generic.

Since: 0.1.0

Methods

series :: Series m (LFile ann) #

(Monad m, LFileConstraint (CoSerial m) ann) => CoSerial m (LFile ann) Source #

Default CoSerial instance via Generic.

Since: 0.1.0

Methods

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

Eq ann => Eq (LFile ann) Source # 

Methods

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

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

Show ann => Show (LFile ann) Source # 

Methods

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

show :: LFile ann -> String #

showList :: [LFile ann] -> ShowS #

Generic (LFile ann) Source # 

Associated Types

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

Methods

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

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

Hashable ann => Hashable (LFile ann) Source #

Default Hashable instance via Generic.

Since: 0.1.0

Methods

hashWithSalt :: Int -> LFile ann -> Int #

hash :: LFile ann -> Int #

ToJSON ann => ToJSON (LFile ann) Source #

Converts to {file: …}.

Since: 0.1.0

Methods

toJSON :: LFile ann -> Value #

toEncoding :: LFile ann -> Encoding #

toJSONList :: [LFile ann] -> Value #

toEncodingList :: [LFile ann] -> Encoding #

FromJSON ann => FromJSON (LFile ann) Source #

Inverse of the ToJSON instance.

Since: 0.1.0

Methods

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

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

NFData ann => NFData (LFile ann) Source #

Default NFData instance via Generic.

Since: 0.1.0

Methods

rnf :: LFile ann -> () #

type Rep (LFile ann) Source # 
type Rep (LFile ann) = D1 (MetaData "LFile" "Language.Ninja.Lexer.Types" "language-ninja-0.2.0-4aVVODOvkNMFxGcRpnztag" True) (C1 (MetaCons "MkLFile" PrefixI True) (S1 (MetaSel (Just Symbol "_lfileExpr") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Expr ann))))

data LBind ann Source #

A Ninja variable binding, top-level or otherwise.

Since: 0.1.0

Constructors

MkLBind 

Fields

Instances

Functor LBind Source # 

Methods

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

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

Foldable LBind Source # 

Methods

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

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

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

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

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

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

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

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

toList :: LBind a -> [a] #

null :: LBind a -> Bool #

length :: LBind a -> Int #

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

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

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

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

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

Traversable LBind Source # 

Methods

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

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

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

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

(Monad m, LBindConstraint (Serial m) ann) => Serial m (LBind ann) Source #

Default Serial instance via Generic.

Since: 0.1.0

Methods

series :: Series m (LBind ann) #

(Monad m, LBindConstraint (CoSerial m) ann) => CoSerial m (LBind ann) Source #

Default CoSerial instance via Generic.

Since: 0.1.0

Methods

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

Eq ann => Eq (LBind ann) Source # 

Methods

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

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

Show ann => Show (LBind ann) Source # 

Methods

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

show :: LBind ann -> String #

showList :: [LBind ann] -> ShowS #

Generic (LBind ann) Source # 

Associated Types

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

Methods

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

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

Hashable ann => Hashable (LBind ann) Source #

Default Hashable instance via Generic.

Since: 0.1.0

Methods

hashWithSalt :: Int -> LBind ann -> Int #

hash :: LBind ann -> Int #

ToJSON ann => ToJSON (LBind ann) Source #

Converts to {ann: …, name: …, value: …}.

Since: 0.1.0

Methods

toJSON :: LBind ann -> Value #

toEncoding :: LBind ann -> Encoding #

toJSONList :: [LBind ann] -> Value #

toEncodingList :: [LBind ann] -> Encoding #

FromJSON ann => FromJSON (LBind ann) Source #

Inverse of the ToJSON instance.

Since: 0.1.0

Methods

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

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

NFData ann => NFData (LBind ann) Source #

Default NFData instance via Generic.

Since: 0.1.0

Methods

rnf :: LBind ann -> () #

type Rep (LBind ann) Source # 
type Rep (LBind ann) = D1 (MetaData "LBind" "Language.Ninja.Lexer.Types" "language-ninja-0.2.0-4aVVODOvkNMFxGcRpnztag" False) (C1 (MetaCons "MkLBind" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_lbindAnn") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ann)) ((:*:) (S1 (MetaSel (Just Symbol "_lbindName") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (LName ann))) (S1 (MetaSel (Just Symbol "_lbindValue") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (Expr ann))))))

data LBuild ann Source #

The data contained within a Ninja build declaration.

Since: 0.1.0

Constructors

MkLBuild 

Fields

Instances

Functor LBuild Source # 

Methods

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

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

Foldable LBuild Source # 

Methods

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

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

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

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

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

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

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

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

toList :: LBuild a -> [a] #

null :: LBuild a -> Bool #

length :: LBuild a -> Int #

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

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

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

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

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

Traversable LBuild Source # 

Methods

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

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

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

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

Annotated LBuild Source #

The usual definition for Annotated.

Since: 0.1.0

Methods

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

(Monad m, LBuildConstraint (Serial m) ann) => Serial m (LBuild ann) Source #

Uses the underlying Serial instances.

Since: 0.1.0

Methods

series :: Series m (LBuild ann) #

(Monad m, LBuildConstraint (CoSerial m) ann) => CoSerial m (LBuild ann) Source #

Default CoSerial instance via Generic.

Since: 0.1.0

Methods

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

Eq ann => Eq (LBuild ann) Source # 

Methods

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

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

Show ann => Show (LBuild ann) Source # 

Methods

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

show :: LBuild ann -> String #

showList :: [LBuild ann] -> ShowS #

Generic (LBuild ann) Source # 

Associated Types

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

Methods

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

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

Hashable ann => Hashable (LBuild ann) Source #

Default Hashable instance via Generic.

Since: 0.1.0

Methods

hashWithSalt :: Int -> LBuild ann -> Int #

hash :: LBuild ann -> Int #

ToJSON ann => ToJSON (LBuild ann) Source #

Converts to {ann: …, outs: …, rule: …, deps: …}.

Since: 0.1.0

Methods

toJSON :: LBuild ann -> Value #

toEncoding :: LBuild ann -> Encoding #

toJSONList :: [LBuild ann] -> Value #

toEncodingList :: [LBuild ann] -> Encoding #

FromJSON ann => FromJSON (LBuild ann) Source #

Inverse of the ToJSON instance.

Since: 0.1.0

Methods

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

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

NFData ann => NFData (LBuild ann) Source #

Default NFData instance via Generic.

Since: 0.1.0

Methods

rnf :: LBuild ann -> () #

type Rep (LBuild ann) Source # 
type Rep (LBuild ann) = D1 (MetaData "LBuild" "Language.Ninja.Lexer.Types" "language-ninja-0.2.0-4aVVODOvkNMFxGcRpnztag" False) (C1 (MetaCons "MkLBuild" PrefixI True) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_lbuildAnn") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ann)) (S1 (MetaSel (Just Symbol "_lbuildOuts") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [Expr ann]))) ((:*:) (S1 (MetaSel (Just Symbol "_lbuildRule") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 (LName ann))) (S1 (MetaSel (Just Symbol "_lbuildDeps") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 [Expr ann])))))

makeLBuild Source #

Arguments

:: ann

The build annotation

-> [Expr ann]

The build outputs

-> LName ann

The rule name

-> [Expr ann]

The build dependencies

-> LBuild ann 

Constructor for an LBuild.

Since: 0.1.0

Classes

class Monad m => PositionParsing m where Source #

This class is kind of like DeltaParsing from trifecta.

Since: 0.1.0

Minimal complete definition

getPosition

Instances

PositionParsing (ParsecT Dec Text m) Source #

Instance for ParsecT from megaparsec.

Since: 0.1.0