dhall-1.42.3: A configuration language guaranteed to terminate

Safe Haskell | None
Language | Haskell2010

Dhall.Freeze

Contents

- Freeze
- Freeze with custom evaluation settings
- Types
- Deprecated functions

Description

This module contains the implementation of the `dhall freeze` subcommand

Synopsis

- freeze :: OutputMode -> Transitivity -> NonEmpty Input -> Scope -> Intent -> Maybe CharacterSet -> Censor -> IO ()
- freezeExpression :: FilePath -> Scope -> Intent -> Expr s Import -> IO (Expr s Import)
- freezeImport :: FilePath -> Import -> IO Import
- freezeRemoteImport :: FilePath -> Import -> IO Import
- freezeWithSettings :: EvaluateSettings -> OutputMode -> Transitivity -> NonEmpty Input -> Scope -> Intent -> Maybe CharacterSet -> Censor -> IO ()
- freezeExpressionWithSettings :: EvaluateSettings -> FilePath -> Scope -> Intent -> Expr s Import -> IO (Expr s Import)
- freezeImportWithSettings :: EvaluateSettings -> FilePath -> Import -> IO Import
- freezeRemoteImportWithSettings :: EvaluateSettings -> FilePath -> Import -> IO Import
- data Scope
  - = OnlyRemoteImports
  - | AllImports
- data Intent
  - = Secure
  - | Cache
- freezeWithManager :: IO Manager -> OutputMode -> Transitivity -> NonEmpty Input -> Scope -> Intent -> Maybe CharacterSet -> Censor -> IO ()
- freezeExpressionWithManager :: IO Manager -> FilePath -> Scope -> Intent -> Expr s Import -> IO (Expr s Import)
- freezeImportWithManager :: IO Manager -> FilePath -> Import -> IO Import
- freezeRemoteImportWithManager :: IO Manager -> FilePath -> Import -> IO Import

# Freeze

freeze :: OutputMode -> Transitivity -> NonEmpty Input -> Scope -> Intent -> Maybe CharacterSet -> Censor -> IO () Source #

Implementation of the `dhall freeze` subcommand

freezeExpression Source #

Arguments

:: FilePath | Starting directory
-> Scope |
-> Intent |
-> Expr s Import |
-> IO (Expr s Import) |

Slightly more pure version of the `freeze` function

This still requires `IO` to freeze the import, but now the input and output expression are passed in explicitly

freezeImport Source #

Arguments

:: FilePath | Current working directory
-> Import |
-> IO Import |

Retrieve an `Import` and update the hash to match the latest contents

freezeRemoteImport Source #

Arguments

:: FilePath | Current working directory
-> Import |
-> IO Import |

Freeze an import only if the import is a `Remote` import

# Freeze with custom evaluation settings

freezeWithSettings :: EvaluateSettings -> OutputMode -> Transitivity -> NonEmpty Input -> Scope -> Intent -> Maybe CharacterSet -> Censor -> IO () Source #

See `freeze`.

freezeExpressionWithSettings :: EvaluateSettings -> FilePath -> Scope -> Intent -> Expr s Import -> IO (Expr s Import) Source #

See `freezeExpression`.

freezeImportWithSettings :: EvaluateSettings -> FilePath -> Import -> IO Import Source #

See `freezeImport`.

freezeRemoteImportWithSettings :: EvaluateSettings -> FilePath -> Import -> IO Import Source #

See `freezeRemoteImport`.

# Types

data Scope Source #

Specifies which imports to freeze

Constructors

OnlyRemoteImports | Freeze only remote imports (i.e. URLs)
AllImports | Freeze all imports (including paths and environment variables)

data Intent Source #

Specifies why we are adding semantic integrity checks

Constructors

Secure | Protect imports with an integrity check without a fallback so that import resolution fails if the import changes
Cache | Protect imports with an integrity check and also add a fallback import import without an integrity check. This is useful if you only want to cache imports when possible but still gracefully degrade to resolving them if the semantic integrity check has changed.

# Deprecated functions

freezeWithManager :: IO Manager -> OutputMode -> Transitivity -> NonEmpty Input -> Scope -> Intent -> Maybe CharacterSet -> Censor -> IO () Source #

Deprecated: Use freezeWithSettings directly

See `freeze`.

freezeExpressionWithManager :: IO Manager -> FilePath -> Scope -> Intent -> Expr s Import -> IO (Expr s Import) Source #

Deprecated: Use freezeExpressionWithSettings directly

See `freezeExpression`.

freezeImportWithManager :: IO Manager -> FilePath -> Import -> IO Import Source #

Deprecated: Use freezeImportWithSettings directly

See `freezeImport`.

freezeRemoteImportWithManager :: IO Manager -> FilePath -> Import -> IO Import Source #

Deprecated: Use freezeRemoteImportWithSettings directly

See `freezeRemoteImport`.