Module Ninja.Pretty

Module to pretty print Ninja build files

Author: Marc Andre Wittorf

Summary of exported operations:

renderNinja :: File -> String  Deterministic 
Render a Ninja file to a string representation
ppFile :: File -> Doc  Deterministic 
Render a Ninja file to a Pretty-Doc
ppDecl :: Decl -> Doc  Deterministic 
Render a Ninja declaration
ppDef :: (String,String) -> Doc  Deterministic 
Render a defintion
ppDefs :: [(String,String)] -> Doc  Deterministic 
Render definitions
ppTargets :: [String] -> Doc  Deterministic 
Render explicit targets
ppImplicitTargets :: [String] -> Doc  Deterministic 
Render implicit targets
ppOrderOnlyTargets :: [String] -> Doc  Deterministic 
Render order-only targets

Exported operations:

renderNinja :: File -> String  Deterministic 

Render a Ninja file to a string representation

Example call:
(renderNinja file)
Parameters:
  • file : the abstract Ninja file representation
Returns:
the rendered Ninja file

ppFile :: File -> Doc  Deterministic 

Render a Ninja file to a Pretty-Doc

Example call:
(ppFile file)
Parameters:
  • file : the abstract Ninja file representation
Returns:
the rendered Ninja file

ppDecl :: Decl -> Doc  Deterministic 

Render a Ninja declaration

Example call:
(ppDecl decl the)
Parameters:
  • decl : a Ninja declaration
  • the : rendered Ninja declaration

ppDef :: (String,String) -> Doc  Deterministic 

Render a defintion

Example call:
(ppDef def)
Parameters:
  • def : the definition
Returns:
the rendered definition

ppDefs :: [(String,String)] -> Doc  Deterministic 

Render definitions

Example call:
(ppDefs defs)
Parameters:
  • defs : the definitions
Returns:
the rendered definitions

ppTargets :: [String] -> Doc  Deterministic 

Render explicit targets

Example call:
(ppTargets tgts)
Parameters:
  • tgts : the targets
Returns:
the rendered targets

ppImplicitTargets :: [String] -> Doc  Deterministic 

Render implicit targets

Example call:
(ppImplicitTargets tgts)
Parameters:
  • tgts : the targets
Returns:
the rendered targets

ppOrderOnlyTargets :: [String] -> Doc  Deterministic 

Render order-only targets

Example call:
(ppOrderOnlyTargets tgts)
Parameters:
  • tgts : the targets
Returns:
the rendered targets