dhall-1.19.1: 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
  - ascii :: Bool
  - standardVersion :: StandardVersion
  }
- data Mode
  - = Default {
    - annotate :: Bool
    }
  - | Version
  - | Resolve {
    - dot :: Bool
    }
  - | Type
  - | Normalize
  - | Repl
  - | Format {
    - inplace :: Maybe FilePath
    }
  - | Freeze {
    - inplace :: Maybe FilePath
    }
  - | Hash
  - | Diff {
    - expr1 :: Text
    - expr2 :: Text
    }
  - | Lint {
    - inplace :: Maybe FilePath
    }
  - | Encode
  - | Decode
- parseOptions :: Parser Options
- parserInfoOptions :: ParserInfo Options
- command :: Options -> IO ()
- main :: IO ()

# Options

data Options Source #

Top-level program options

Constructors

Options |

Fields

- mode :: Mode
- explain :: Bool
- plain :: Bool
- ascii :: Bool
- standardVersion :: StandardVersion

data Mode Source #

The subcommands for the `dhall` executable

Constructors

Default |

Fields

- annotate :: Bool

Version |
Resolve |

Fields

- dot :: Bool

Type |
Normalize |
Repl |
Format |

Fields

- inplace :: Maybe FilePath

Freeze |

Fields

- inplace :: Maybe FilePath

Hash |
Diff |

Fields

- expr1 :: Text
- expr2 :: Text

Lint |

Fields

- inplace :: Maybe FilePath

Encode |
Decode |

parseOptions :: Parser Options Source #

`Parser` for the `Options` type

parserInfoOptions :: ParserInfo Options Source #

`ParserInfo` for the `Options` type

# Execution

command :: Options -> IO () Source #

Run the command specified by the `Options` type

main :: IO () Source #

Entry point for the `dhall` executable