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

Description

Tools for parsing, pretty-printing, and compiling the Ninja build language.

This module re-exports some of the modules under the Language.Ninja namespace for convenience.

Take a look at Language.Ninja.Tutorial for a tutorial on how to use this library. If you just want to dive in, I recommend reading these modules in the following order:

  1. Skim Language.Ninja.Misc, Language.Ninja.Mock, and Language.Ninja.Errors for familiarity with types and values that are used all over this library.
  2. Check out Language.Ninja.Lexer and then Language.Ninja.Parser to get an idea for what is possible with the lexer/parser API.
  3. Read Language.Ninja.AST to understand what the parsed AST looks like.
  4. Read Language.Ninja.Compile to see what the AST-to-IR compiler does.
  5. Read Language.Ninja.IR to understand what the compiled IR looks like.
  6. Read Language.Ninja.Pretty to see what the pretty-printer is capable of (spoiler: not very much).

If you are not already well-versed in the Ninja build language, it is also probably worth reading the Ninja manual.

When importing from this library, I recommend the following style:

import qualified Language.Ninja     as Ninja
import qualified Language.Ninja.AST as Ninja.AST
import qualified Language.Ninja.IR  as Ninja.IR

Happy hacking!

Since: 0.1.0

Documentation