dhall-1.42.2: A configuration language guaranteed to terminate

Safe Haskell | None
Language | Haskell2010

Dhall.Main

Contents

- Options
- Execution

Description

This module contains the top-level entrypoint and options parsing for the `dhall` executable

Synopsis

- data Options = Options {
  - mode :: Mode
  - explain :: Bool
  - plain :: Bool
  - chosenCharacterSet :: Maybe CharacterSet
  - censor :: Censor
  }
- data Mode
  - = Default {
    - file :: Input
    - output :: Output
    - annotate :: Bool
    - alpha :: Bool
    - semanticCacheMode :: SemanticCacheMode
    - version :: Bool
    }
  - | Version
  - | Resolve {
    - file :: Input
    - resolveMode :: Maybe ResolveMode
    - semanticCacheMode :: SemanticCacheMode
    }
  - | Type {
    - file :: Input
    - quiet :: Bool
    - semanticCacheMode :: SemanticCacheMode
    }
  - | Normalize {
    - file :: Input
    - alpha :: Bool
    }
  - | Repl
  - | Format {
    - deprecatedInPlace :: Bool
    - transitivity :: Transitivity
    - outputMode :: OutputMode
    - inputs :: NonEmpty Input
    }
  - | Freeze {
    - deprecatedInPlace :: Bool
    - transitivity :: Transitivity
    - all_ :: Bool
    - cache :: Bool
    - outputMode :: OutputMode
    - inputs :: NonEmpty Input
    }
  - | Hash {
    - file :: Input
    - cache :: Bool
    }
  - | Diff {
    - expr1 :: Text
    - expr2 :: Text
    }
  - | Lint {
    - deprecatedInPlace :: Bool
    - transitivity :: Transitivity
    - outputMode :: OutputMode
    - inputs :: NonEmpty Input
    }
  - | Tags {
    - input :: Input
    - output :: Output
    - suffixes :: Maybe [Text]
    - followSymlinks :: Bool
    }
  - | Encode {
    - file :: Input
    - json :: Bool
    }
  - | Decode {
    - file :: Input
    - json :: Bool
    - quiet :: Bool
    }
  - | Text {
    - file :: Input
    - output :: Output
    }
  - | DirectoryTree {
    - allowSeparators :: Bool
    - file :: Input
    - path :: FilePath
    }
  - | Schemas {
    - file :: Input
    - outputMode :: OutputMode
    - schemas :: Text
    }
  - | SyntaxTree {
    - file :: Input
    - noted :: Bool
    }
  - | Package {
    - name :: Maybe String
    - files :: NonEmpty FilePath
    }
- data ResolveMode
  - = Dot
  - | ListTransitiveDependencies
  - | ListImmediateDependencies
- parseOptions :: Parser Options
- parserInfoOptions :: ParserInfo Options
- command :: Options -> IO ()
- main :: IO ()

# Options

data Options #

Top-level program options

Constructors

Options |

Fields

- mode :: Mode
- explain :: Bool
- plain :: Bool
- chosenCharacterSet :: Maybe CharacterSet
- censor :: Censor

data Mode #

The subcommands for the `dhall` executable

Constructors

Default |

Fields

- file :: Input
- output :: Output
- annotate :: Bool
- alpha :: Bool
- semanticCacheMode :: SemanticCacheMode
- version :: Bool

Version |
Resolve |

Fields

- file :: Input
- resolveMode :: Maybe ResolveMode
- semanticCacheMode :: SemanticCacheMode

Type |

Fields

- file :: Input
- quiet :: Bool
- semanticCacheMode :: SemanticCacheMode

Normalize |

Fields

- file :: Input
- alpha :: Bool

Repl |
Format |

Fields

- deprecatedInPlace :: Bool
- transitivity :: Transitivity
- outputMode :: OutputMode
- inputs :: NonEmpty Input

Freeze |

Fields

- deprecatedInPlace :: Bool
- transitivity :: Transitivity
- all_ :: Bool
- cache :: Bool
- outputMode :: OutputMode
- inputs :: NonEmpty Input

Hash |

Fields

- file :: Input
- cache :: Bool

Diff |

Fields

- expr1 :: Text
- expr2 :: Text

Lint |

Fields

- deprecatedInPlace :: Bool
- transitivity :: Transitivity
- outputMode :: OutputMode
- inputs :: NonEmpty Input

Tags |

Fields

- input :: Input
- output :: Output
- suffixes :: Maybe [Text]
- followSymlinks :: Bool

Encode |

Fields

- file :: Input
- json :: Bool

Decode |

Fields

- file :: Input
- json :: Bool
- quiet :: Bool

Text |

Fields

- file :: Input
- output :: Output

DirectoryTree |

Fields

- allowSeparators :: Bool
- file :: Input
- path :: FilePath

Schemas |

Fields

- file :: Input
- outputMode :: OutputMode
- schemas :: Text

SyntaxTree |

Fields

- file :: Input
- noted :: Bool

Package |

Fields

- name :: Maybe String
- files :: NonEmpty FilePath

data ResolveMode #

This specifies how to resolve transitive dependencies

Constructors

Dot | Generate a DOT file for `graphviz`
ListTransitiveDependencies | List all transitive dependencies as text, one per line
ListImmediateDependencies | List immediate dependencies as text, one per line

parseOptions :: Parser Options #

`Parser` for the `Options` type

parserInfoOptions :: ParserInfo Options #

`ParserInfo` for the `Options` type

# Execution

command :: Options -> IO () #

Run the command specified by the `Options` type

main :: IO () #

Entry point for the `dhall` executable