-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | JSON Compilation Database Format encoding and decoding
--   
--   See README.md
--   
--   This library provides a data type to represent a <a>JSON Compilation
--   Database Format file</a>
--   
--   It may be useful for static analysis tools that need to know the exact
--   commands executed by a build system such as make.
@package clang-compilation-database
@version 0.1.0.1


-- | Clang Compilation Database Format parser
--   
--   The <a>Clang Compilation Database Format</a> is a JSON file format for
--   recording compiler invocations in build systems.
module Clang.CompilationDatabase

-- | A Compilation database consists of a sequence of <a>CommandObject</a>
--   values each of which is a set of commands that acted upon a single
--   source file.
type CompilationDatabase = [CommandObject]

-- | Each command object contains the translation unit’s main file, the
--   working directory of the compile run and the actual compile command.
data CommandObject
CommandObject :: Text -> Text -> Maybe Text -> Maybe [Text] -> Maybe Text -> CommandObject

-- | The working directory during compilation
[directory] :: CommandObject -> Text

-- | The main translation unit processed by this compilation step. There
--   may be multiple <a>CommandObject</a> values in a
--   <a>CompilationDatabase</a> for the same file if it was the main file
--   for multiple compilation steps.
[file] :: CommandObject -> Text

-- | The command that was executed. Double quotes and backslashes are
--   escaped by a backslash.
[command] :: CommandObject -> Maybe Text

-- | The compile command executed as a list of strings. Either
--   <a>command</a> or <a>arguments</a> is required. <b>TODO</b> model this
--   more faithfully.
[arguments] :: CommandObject -> Maybe [Text]

-- | Optional name of the output file created by this compilation step.
[output] :: CommandObject -> Maybe Text
instance GHC.Show.Show Clang.CompilationDatabase.CommandObject
instance GHC.Generics.Generic Clang.CompilationDatabase.CommandObject
instance Data.Aeson.Types.FromJSON.FromJSON Clang.CompilationDatabase.CommandObject
instance Data.Aeson.Types.ToJSON.ToJSON Clang.CompilationDatabase.CommandObject
