hpack-dhall-0.5.1: 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 Source #

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 Source #

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 Source #

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 Source #

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 Source #

The default package file name is package.dhall.