Safe Haskell | None |
---|---|
Language | Haskell2010 |
- parseMakefile :: IO (Either String Makefile)
- parseAsMakefile :: FilePath -> IO (Either String Makefile)
- makefile :: Parser Makefile
- entry :: Parser Entry
- assignment :: Parser Entry
- rule :: Parser Entry
- command :: Parser Command
- target :: Parser Target
- dependency :: Parser Dependency
- lazyVar :: Parser ByteString
- immVar :: Parser ByteString
- comment :: Parser ByteString
Documentation
parseMakefile :: IO (Either String Makefile) Source #
Parse makefile.
Tries to open and parse a file name Makefile
in the current directory.
parseAsMakefile :: FilePath -> IO (Either String Makefile) Source #
Parse the specified file as a makefile.
assignment :: Parser Entry Source #
Parser of variable assignment
dependency :: Parser Dependency Source #
Parser for a (rule) dependency
lazyVar :: Parser ByteString Source #
Parser for variable name in declaration (lazy set, var = x
)
>>>
Atto.parseOnly lazyVar "CFLAGS=-c -Wall"
Right "CFLAGS"
immVar :: Parser ByteString Source #
Parser for variable name in declaration (immediate set, var := x
)
>>>
Atto.parseOnly immVar "CFLAGS:=-c -Wall"
Right "CFLAGS"
comment :: Parser ByteString Source #
Parser for a comment (the comment starts with the hashtag)
>>>
Atto.parseOnly comment "# I AM A COMMENT"
Right " I AM A COMMENT"