makefile-1.1.0.0: Simple Makefile parser and generator

Copyright(c) 2016 Nicolas Mattia
LicenseMIT
MaintainerNicolas Mattia <nicolas@nmattia.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Data.Makefile

Description

This module defines the different types used when working with a Makefile.

# File: Makefile

hello = world

foo: bar
  baz
Makefile {
  entries =
    [ Assignment RecursiveAssign "hello" "world"
    , Rule (Target "foo") [Dependency "bar"] [Command "baz"]
    ]
  }
Synopsis

Documentation

data Makefile #

A Makefile object, a list of makefile entries

Constructors

Makefile 

Fields

Instances
Eq Makefile # 
Instance details

Defined in Data.Makefile

Read Makefile # 
Instance details

Defined in Data.Makefile

Show Makefile # 
Instance details

Defined in Data.Makefile

data Entry #

A makefile entry, either a rule (target: dep1 dep1; commands) or a variable assignment (hello = world or hello := world)

Constructors

Rule Target [Dependency] [Command] 
Assignment AssignmentType Text Text 
OtherLine Text

Catch all value for comments, empty lines and lines that failed to parse.

Instances
Eq Entry # 
Instance details

Defined in Data.Makefile

Methods

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

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

Read Entry # 
Instance details

Defined in Data.Makefile

Show Entry # 
Instance details

Defined in Data.Makefile

Methods

showsPrec :: Int -> Entry -> ShowS #

show :: Entry -> String #

showList :: [Entry] -> ShowS #

newtype Target #

Makefile target (foo in the example above)

Constructors

Target Text 
Instances
Eq Target # 
Instance details

Defined in Data.Makefile

Methods

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

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

Read Target # 
Instance details

Defined in Data.Makefile

Show Target # 
Instance details

Defined in Data.Makefile

IsString Target # 
Instance details

Defined in Data.Makefile

Methods

fromString :: String -> Target #

newtype Dependency #

Target dependency (bar in the example above)

Constructors

Dependency Text 
Instances
Eq Dependency # 
Instance details

Defined in Data.Makefile

Read Dependency # 
Instance details

Defined in Data.Makefile

Show Dependency # 
Instance details

Defined in Data.Makefile

IsString Dependency # 
Instance details

Defined in Data.Makefile

newtype Command #

Command (baz in the example above)

Constructors

Command Text 
Instances
Eq Command # 
Instance details

Defined in Data.Makefile

Methods

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

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

Read Command # 
Instance details

Defined in Data.Makefile

Show Command # 
Instance details

Defined in Data.Makefile

IsString Command # 
Instance details

Defined in Data.Makefile

Methods

fromString :: String -> Command #