hpack-dhall-0.5.2: hpack's dhalling

Copyright© 2018 Phil de Joux
© 2018 Block Scope Limited
LicenseBSD3
MaintainerPhil de Joux <phil.dejoux@blockscope.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Hpack.Dhall

Description

The functions in this module make it possible to configure an hpack package description with Dhall instead of YAML. When doing so, note that all functions resolve imports relative to the location of the given .dhall input file.

Synopsis

Documentation

fileToJson #

Arguments

:: FilePath

Path to a .dhall file

-> IO (Either String ([String], Value)) 

A file decoder for hpack. This should evaluate to a single record with hpack's top-level fields.

showJson #

Arguments

:: Maybe (Text -> Text -> Ordering)

An ordering of JSON fields.

-> FilePath

Path to a .dhall file

-> IO String 

Pretty prints JSON for the package description.

showYaml #

Arguments

:: Maybe (Text -> Text -> Ordering)

An ordering of YAML fields.

-> FilePath

Path to a .dhall file

-> IO String 

Pretty prints YAML for the package description.

showDhall #

Arguments

:: FilePath

Path to a .dhall file

-> IO String 

Pretty prints the package description Dhall expression, resolving imports relative to the location of the .dhall file.

packageConfig :: FilePath #

The default package file name is package.dhall.