dhall-purifier full guide
Detailed setup, dependency management, build commands, and troubleshooting. Start with the overview for the initial commands; use the sections below for the complete setup and behavior. dhall-purifier is classified at maturity tier 4 (see tier assessment for details).
Contents
- Setup and activation
- Version compatibility
- Development loop
- Using locked dependencies
- Working offline
- Language tooling integration
- Nix builds
- Project projections
- Supported scope
Setup and activation
Use the overview’s Quickstart for the initial command sequence. The setup details below apply to that workflow.
Locking runs Dhall’s native freeze command on the selected file and its local
imports, adding integrity checks to remote imports. Commit those files and
dhall-purifier.lock.json. Nix realizes the checked imports as native semantic
cache entries. Your local expressions remain editable.
The shell provides dhall, dhall-to-json, json-to-dhall and
dhall-lsp-server wrappers. Without a lockfile, they warn and run the ordinary,
impure tools. Invalid or stale locks fail. The wrappers can also be installed
through your normal Nix configuration.
Version compatibility
| Tool or language | Packaged defaults | Tested versions |
|---|---|---|
| Dhall | 1.42.3 | — |
Operating systems and architectures
| OS | CPU architecture | Packaged toolchain | Recorded workflow |
|---|---|---|---|
| Linux | ARM64 | Yes | Not recorded |
| Linux | x86-64 | Yes | Tested |
Development loop
Source edits do not require relocking. Changes to import declarations do:
dhall-purifier lock --update
Using locked dependencies
Repeat --file when capturing several entry points. --input path tracks extra
selection files. Use --project and --lock for an external companion; wrappers
accept DHALL_PURIFIER_PROJECT and DHALL_PURIFIER_LOCK. Environment generations
retain their dependency and frontend closures for garbage collection.
Working offline
dhall-purifier prefetch
dhall-purifier exec -- your-command
Language tooling integration
dhall --file package.dhall
dhall-to-json --file package.dhall
dhall-lsp-server
Locked tools use HTTP-disabled builds and a private cache under
.dhall-purifier/. Dependency cache entries point to readonly Nix outputs.
Editors use the same environment through the language-server wrapper.
Nix builds
An optional definition can use the overlay’s named builder:
pkgs.dhall-purifier.buildDhallProject {
src = ./.;
}
It exposes evaluation-known packages, tests, release and fetches.
The imports’ fetch hashes cover Dhall’s canonical binary encodings. A fixed-output
Nix derivation runs the native resolver and checks both those bytes and Dhall’s
integrity checks.
Project projections
This integration provides native release artifacts, rather than a typed cross-purifier project projection interface. The publication workflow below uses those native artifacts.
dhall-purifier bundle
dhall-purifier publish --tag v0.1.0
Publication uploads an importable, normalized source.dhall and an archive
containing the native source, binary expression and semantic cache. Ordinary
Dhall can consume the source without the wrapper.
Supported scope
The initial integration targets Dhall 1.42.3 on Linux. Local code imports must
stay within the project. Environment imports and custom HTTP headers are
unsupported. --no-cache bypasses the prepared semantic cache and cannot fetch
remote imports in locked commands.
Target systems
- x86_64-linux
- aarch64-linux