* Remove Dhall.X and replace with Data.Void This commit removes the Dhall.X module and the Dhall.X.X type, preferring the use of Data.Void.Void. As I'm sure a lot of people are actually using X, I've added a type-alias type X = Void. However, pattern matching on X would be a breaking change. Fixes #1120. * Restore unsafeCoerce * Fix regression * Unused * Reorganise exports * Fix dhall-nix * Another fix * Fix Dhall.LSP.Backend.Typing * Fix dhall-bash |
||
---|---|---|
.. | ||
exec | ||
src/Dhall | ||
default.nix | ||
dhall-bash.cabal | ||
LICENSE | ||
README.md | ||
Setup.hs | ||
shell.nix |
dhall-bash
For installation or development instructions, see:
Full documentation here:
Introduction
This dhall-bash
package provides a Dhall to Bash compiler so that you can
easily marshall Dhall values into your Bash scripts
This does not compile all available Dhall language constructs into Bash and only supports extracting primitive values, lists, optional values and records from normalized expressions.
Example
$ dhall-to-bash <<< '1'
1
$ dhall-to-bash <<< '"ABC" ++ "DEF"'
ABCDEF
$ dhall-to-bash --declare FOO <<< '"ABC" ++ "DEF"'
declare -r FOO=ABCDEF
$ eval $(dhall-to-bash --declare FOO <<< '"ABC" ++ "DEF"')
$ echo "${FOO}"
ABCDEF
$ dhall-to-bash --declare BAR
let replicate = https://prelude.dhall-lang.org/List/replicate
in replicate 10 Natural 1
<Ctrl-D>
declare -r -a BAR=(1 1 1 1 1 1 1 1 1 1)
$ dhall-to-bash --declare BAZ <<< '{ qux = 1, xyzzy = True }'
declare -r -A BAZ=([qux]=1 [xyzzy]=true)