dhall-1.15.0: A configuration language guaranteed to terminate

Dhall.TH

Description

This module provides staticDhallExpression which can be used to resolve all of an expression’s imports at compile time, allowing one to reference Dhall expressions from Haskell without having a runtime dependency on the location of Dhall files.

For example, given a file “Some/Type.dhall” containing

: Natural | Other : ../Other/Type.dhall

rather than duplicating the AST manually in a Haskell Type, you can do

Dhall.Type (case UnionLit This _ _ -> ... UnionLit Other _ _ -> ...) \$(staticDhallExpression "....Some/Type.dhall")

This would create the Dhall Expr AST from the dhall file at compile time with all imports resolved, making it easy to keep your Dhall configs and Haskell interpreters in sync.

Synopsis

# Documentation

This fully resolves, type checks, and normalizes the expression, so the resulting AST is self-contained.