| Copyright | (c) 2016 Nicolas Mattia |
|---|---|
| License | MIT |
| Maintainer | Nicolas Mattia <nicolas@nmattia.com> |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
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
- data Makefile = Makefile {}
- data Entry
- data AssignmentType
- newtype Target = Target Text
- newtype Dependency = Dependency Text
- newtype Command = Command Text
Documentation
A Makefile object, a list of makefile entries
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. |
data AssignmentType #
Constructors
| RecursiveAssign | foo = bar |
| SimpleAssign | foo := bar |
| SimplePosixAssign | foo ::= bar |
| ConditionalAssign | foo ?= bar |
| ShellAssign | foo != bar |
| AppendAssign | foo += bar |
Instances
| Bounded AssignmentType # | |
Defined in Data.Makefile | |
| Enum AssignmentType # | |
Defined in Data.Makefile Methods succ :: AssignmentType -> AssignmentType # pred :: AssignmentType -> AssignmentType # toEnum :: Int -> AssignmentType # fromEnum :: AssignmentType -> Int # enumFrom :: AssignmentType -> [AssignmentType] # enumFromThen :: AssignmentType -> AssignmentType -> [AssignmentType] # enumFromTo :: AssignmentType -> AssignmentType -> [AssignmentType] # enumFromThenTo :: AssignmentType -> AssignmentType -> AssignmentType -> [AssignmentType] # | |
| Eq AssignmentType # | |
Defined in Data.Makefile Methods (==) :: AssignmentType -> AssignmentType -> Bool # (/=) :: AssignmentType -> AssignmentType -> Bool # | |
| Read AssignmentType # | |
Defined in Data.Makefile Methods readsPrec :: Int -> ReadS AssignmentType # readList :: ReadS [AssignmentType] # | |
| Show AssignmentType # | |
Defined in Data.Makefile Methods showsPrec :: Int -> AssignmentType -> ShowS # show :: AssignmentType -> String # showList :: [AssignmentType] -> ShowS # | |
Makefile target (foo in the example above)
newtype Dependency #
Target dependency (bar in the example above)
Constructors
| Dependency Text |
Instances
| Eq Dependency # | |
Defined in Data.Makefile | |
| Read Dependency # | |
Defined in Data.Makefile Methods readsPrec :: Int -> ReadS Dependency # readList :: ReadS [Dependency] # readPrec :: ReadPrec Dependency # readListPrec :: ReadPrec [Dependency] # | |
| Show Dependency # | |
Defined in Data.Makefile Methods showsPrec :: Int -> Dependency -> ShowS # show :: Dependency -> String # showList :: [Dependency] -> ShowS # | |
| IsString Dependency # | |
Defined in Data.Makefile Methods fromString :: String -> Dependency # | |