{"id":13442937,"url":"https://github.com/dhall-lang/dhall-haskell","last_synced_at":"2025-05-13T23:09:39.683Z","repository":{"id":38106433,"uuid":"67623822","full_name":"dhall-lang/dhall-haskell","owner":"dhall-lang","description":"Maintainable configuration files","archived":false,"fork":false,"pushed_at":"2025-05-05T19:58:19.000Z","size":10141,"stargazers_count":934,"open_issues_count":159,"forks_count":218,"subscribers_count":27,"default_branch":"main","last_synced_at":"2025-05-07T08:36:16.411Z","etag":null,"topics":["configuration-language","dhall","haskell"],"latest_commit_sha":null,"homepage":"https://dhall-lang.org/","language":"Dhall","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dhall-lang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-09-07T16:18:15.000Z","updated_at":"2025-04-30T21:30:15.000Z","dependencies_parsed_at":"2023-02-04T14:01:55.701Z","dependency_job_id":"46caefd6-b7a0-4f21-9063-714ddec1ab95","html_url":"https://github.com/dhall-lang/dhall-haskell","commit_stats":{"total_commits":1993,"total_committers":145,"mean_commits":"13.744827586206897","dds":0.4024084295032614,"last_synced_commit":"8c3f6577bc28f9757d8ef607a0a53ac20be753fb"},"previous_names":[],"tags_count":53,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhall-lang%2Fdhall-haskell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhall-lang%2Fdhall-haskell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhall-lang%2Fdhall-haskell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhall-lang%2Fdhall-haskell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhall-lang","download_url":"https://codeload.github.com/dhall-lang/dhall-haskell/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253611165,"owners_count":21935828,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["configuration-language","dhall","haskell"],"created_at":"2024-07-31T03:01:53.552Z","updated_at":"2025-05-13T23:09:34.661Z","avatar_url":"https://github.com/dhall-lang.png","language":"Dhall","funding_links":[],"categories":["Dhall","Binding","Haskell","Configuration","haskell"],"sub_categories":[],"readme":"# `dhall-haskell`\n\nYou will probably want to read the language-agnostic `README` here:\n\n* [`dhall-lang` `README`](https://github.com/dhall-lang/dhall-lang/blob/master/README.md)\n\nThis repository focuses on the Haskell bindings to Dhall and contains\nthe following packages:\n\n* [`dhall`](./dhall) - [![Hackage](https://img.shields.io/hackage/v/dhall.svg)](https://hackage.haskell.org/package/dhall)\n* [`dhall-bash`](./dhall-bash) - [![Hackage](https://img.shields.io/hackage/v/dhall-bash.svg)](https://hackage.haskell.org/package/dhall-bash)\n* [`dhall-json`](./dhall-json) - [![Hackage](https://img.shields.io/hackage/v/dhall-json.svg)](https://hackage.haskell.org/package/dhall-json)\n* [`dhall-yaml`](./dhall-yaml) - [![Hackage](https://img.shields.io/hackage/v/dhall-yaml.svg)](https://hackage.haskell.org/package/dhall-yaml)\n* [`dhall-nix`](./dhall-nix) - [![Hackage](https://img.shields.io/hackage/v/dhall-nix.svg)](https://hackage.haskell.org/package/dhall-nix)\n* [`dhall-lsp-server`](./dhall-lsp-server) - [![Hackage](https://img.shields.io/hackage/v/dhall-lsp-server.svg)](https://hackage.haskell.org/package/dhall-lsp-server)\n* [`dhall-docs`](./dhall-docs) - [![Hackage](https://img.shields.io/hackage/v/dhall-docs.svg)](https://hackage.haskell.org/package/dhall-docs)\n* [`dhall-toml`](./dhall-toml) - [![Hackage](https://img.shields.io/hackage/v/dhall-toml.svg)](https://hackage.haskell.org/package/dhall-toml)\n* [`dhall-csv`](./dhall-csv) - [![Hackage](https://img.shields.io/hackage/v/dhall-csv.svg)](https://hackage.haskell.org/package/dhall-csv)\n\nNavigate to each package's directory for their respective `README`s\n\n## Pre-built binaries\n\nYou can download pre-built binaries for Windows, OS X and Linux on the release page:\n\n* [`dhall-haskell` - Releases](https://github.com/dhall-lang/dhall-haskell/releases)\n\nYou can also install binaries for OS X using `brew`, like this:\n\n```bash\n$ brew install dhall-json\n```\n\nYou can also install pre-built Linux binaries for `master` using Nix using\nNix's channel mechanism by following the instructions at this link:\n\n* [https://hydra.dhall-lang.org/jobset/dhall-haskell/master/channel/latest](https://hydra.dhall-lang.org/jobset/dhall-haskell/master/channel/latest)\n\nTo install the Nix build products without a channel, configure your machine to\nuse `cache.dhall-lang.org`, as described in the [nix](#nix) section and then\nvisit one of the following links:\n\n* [https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall/latest](https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall/latest)\n* [https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-bash/latest](https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-bash/latest)\n* [https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-json/latest](https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-json/latest)\n* [https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-yaml/latest](https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-yaml/latest)\n* [https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-nix/latest](https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-nix/latest)\n* [https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-lsp-server/latest](https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-lsp-server/latest)\n* [https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-docs/latest](https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-docs/latest)\n* [https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-toml/latest](https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-toml/latest)\n* [https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-csv/latest](https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall-csv/latest)\n\nYou can then click the \"Help\" button in the bottom right corner, which will\nshow you a `nix-env` command that you can run to install the prebuilt\nexecutable.\n\nIf you have the `jq` command-line tool installed then you can do this in one\ncommand by running:\n\n```haskell\n$ nix-env -i \"$(curl -L https://hydra.dhall-lang.org/job/dhall-haskell/master/linux-dhall/latest/api/get-info | jq -r .outPath)\"\n```\n\nThese instructions also work for any pull request, too, by replacing `master`\nwith the pull request number for any of the above URLs.\n\n## Pre-built containers\n\nPrebuilt containers for the latest release available from Docker Hub:\n\n* [Docker Hub - `dhallhaskell`](https://hub.docker.com/u/dhallhaskell)\n\n... but if you want to obtain containers for bleeding-edge builds, you can\ndownload image archives for each package using the following URLs:\n\n* [https://hydra.dhall-lang.org/job/dhall-haskell/master/image-dhall/latest/download/1/docker-image-dhall.tar.gz](https://hydra.dhall-lang.org/job/dhall-haskell/master/image-dhall/latest/download/1/docker-image-dhall.tar.gz)\n* [https://hydra.dhall-lang.org/job/dhall-haskell/master/image-dhall-bash/latest/download/1/docker-image-dhall-bash.tar.gz](https://hydra.dhall-lang.org/job/dhall-haskell/master/image-dhall-bash/latest/download/1/docker-image-dhall-bash.tar.gz)\n* [https://hydra.dhall-lang.org/job/dhall-haskell/master/image-dhall-json/latest/download/1/docker-image-dhall-json.tar.gz](https://hydra.dhall-lang.org/job/dhall-haskell/master/image-dhall-json/latest/download/1/docker-image-dhall-json.tar.gz)\n* [https://hydra.dhall-lang.org/job/dhall-haskell/master/image-dhall-yaml/latest/download/1/docker-image-dhall-yaml.tar.gz](https://hydra.dhall-lang.org/job/dhall-haskell/master/image-dhall-yaml/latest/download/1/docker-image-dhall-yaml.tar.gz)\n* [https://hydra.dhall-lang.org/job/dhall-haskell/master/image-dhall-lsp-server/latest/download/1/docker-image-dhall-lsp-server.tar.gz](https://hydra.dhall-lang.org/job/dhall-haskell/master/image-dhall-lsp-server/latest/download/1/docker-image-dhall-lsp-server.tar.gz)\n* [https://hydra.dhall-lang.org/job/dhall-haskell/master/image-dhall-nix/latest/download/1/docker-image-dhall-nix.tar.gz](https://hydra.dhall-lang.org/job/dhall-haskell/master/image-dhall-nix/latest/download/1/docker-image-dhall-nix.tar.gz)\n* [https://hydra.dhall-lang.org/job/dhall-haskell/master/image-dhall-docs/latest/download/1/docker-image-dhall-docs.tar.gz](https://hydra.dhall-lang.org/job/dhall-haskell/master/image-dhall-docs/latest/download/1/docker-image-dhall-docs.tar.gz)\n* [https://hydra.dhall-lang.org/job/dhall-haskell/master/image-dhall-toml/latest/download/1/docker-image-dhall-toml.tar.gz](https://hydra.dhall-lang.org/job/dhall-haskell/master/image-dhall-toml/latest/download/1/docker-image-dhall-toml.tar.gz)\n* [https://hydra.dhall-lang.org/job/dhall-haskell/master/image-dhall-csv/latest/download/1/docker-image-dhall-csv.tar.gz](https://hydra.dhall-lang.org/job/dhall-haskell/master/image-dhall-csv/latest/download/1/docker-image-dhall-csv.tar.gz)\n\nYou can then load and run one of these archives like so:\n\n```bash\n$ NAME=\"dhall\"\n\n$ curl --location --remote-name \"https://hydra.dhall-lang.org/job/dhall-haskell/master/image-${NAME}/latest/download/1/docker-image-${NAME}.tar.gz\"\n\n$ docker load \u003c \"docker-image-${NAME}.tar.gz\"\n...\nLoaded image: dhall:vx95jiijmp2i07f5ynl8h6sllf34jggz\n\n$ docker run --interactive --rm dhall:vx95jiijmp2i07f5ynl8h6sllf34jggz dhall \u003c\u003c\u003c '2 + 2'\n4\n```\n\nThese instructions also work for any pull request, too, by replacing `master`\nwith the pull request number for any of the above URLs.\n\n## Building from source\n\nFor all of the following instructions, make sure to first check out the\n`dhall-lang` submodule:\n\n```bash\n$ git submodule init\n$ git submodule update\n```\n\n### [cabal](https://www.haskell.org/cabal)\n\nYou can build all of the packages by running:\n\n```console\n$ cabal new-build all\n```\n\nAnd each of them with `cabal new-build \u003cpackage-name\u003e`, for example:\n\n```console\n$ cabal new-build dhall\n```\n\n... or you can run `cabal new-build` within each package directory.\n\n### [nix](https://nixos.org/nix/)\n\nYou will probably want to use the shared caches hosted at `cache.dhall-lang.org`\nand `dhall.cachix.org` when doing Nix development.  This is not required, but\nthis will save you a lot of time so that you don't have to build as many\ndependencies from scratch the first time.\n\nIf your operating system is NixOS then you can add the cache using these NixOS\nconfiguration options to access dhall packages from your declarative configuration file:\n\n```nix\n  nix = {\n    binaryCaches = [\n      \"https://cache.nixos.org\"\n      \"https://cache.dhall-lang.org\"\n      \"https://dhall.cachix.org\"\n    ];\n\n    binaryCachePublicKeys = [\n      \"cache.dhall-lang.org:I9/H18WHd60olG5GsIjolp7CtepSgJmM2CsO813VTmM=\"\n      \"dhall.cachix.org-1:8laGciue2JBwD49ICFtg+cIF8ddDaW7OFBjDb/dHEAo=\"\n    ];\n  };\n```\n\nIf you are not using NixOS, then instead modify your `/etc/nix/nix.conf` file\nby adding the following options.\n\nUsing Nix 2.0 or later:\n\n```\ntrusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.dhall-lang.org:I9/H18WHd60olG5GsIjolp7CtepSgJmM2CsO813VTmM= dhall.cachix.org-1:8laGciue2JBwD49ICFtg+cIF8ddDaW7OFBjDb/dHEAo=\nsubstituters = https://cache.nixos.org https://cache.dhall-lang.org https://dhall.cachix.org\n```\n\nUsing earlier Nix versions (i.e. Nix `1.*`):\n\n```\nbinary-cache-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.dhall-lang.org:I9/H18WHd60olG5GsIjolp7CtepSgJmM2CsO813VTmM= dhall.cachix.org-1:8laGciue2JBwD49ICFtg+cIF8ddDaW7OFBjDb/dHEAo=\nbinary-caches = https://cache.nixos.org https://cache.dhall-lang.org https://dhall.cachix.org\n```\n\nSince many tests require HTTP access, you should also add this setting to\nyour `/etc/nix/nix.conf`:\n\n```\nsandbox = false\n```\n\nYou can build all of the packages by running:\n\n```console\n$ nix-build\n```\n\n... or you can run `nix-build` within each package's respective directory to\nbuild just that one package.\n\nYou can install all of the packages by running:\n\n```\n$ nix-env --install --file default.nix\n```\n\n... or you can run the same command within each package's respective directory\nto install just that one package.\n\nIf you prefer installing the binaries locally in a nix shell environment\ninstead, just run `nix-shell` in the top-level directory.  This option provides\nadditional flexibility with respect to overriding some of the default parameters\n(e.g. the compiler version), which makes it particularly useful for developers.\n\nYou can develop any package by navigating to that package's directory and\nrunning:\n\n```bash\n$ nix-shell\n[nix-shell]$ cabal configure\n[nix-shell]$ cabal build\n[nix-shell]$ cabal test\n```\n\n... or you can add `nix: True` to your `~/.cabal/config` file and then you can\nrun the same `cabal` commands without an explicit `nix-shell`:\n\n```bash\n$ cabal configure\n$ cabal build\n$ cabal test\n```\n\n### [stack](https://docs.haskellstack.org)\n\nYou can build all of the packages with\n\n```console\n$ stack build\n```\n\nAnd each of them with `stack build \u003cpackage-name\u003e`, for example:\n\n```console\n$ stack build dhall-json\n```\n\n## Profiling\n\nSay you want to profile the `dhall-to-json` executable.\n\nBuild the containing package with profiling options:\n\n```console\n$ stack build --profile --library-profiling dhall-json\n```\n\nRun the executable on your input. For example:\n\n```console\n$ stack exec --profile --rts-options -p -- dhall-to-json \u003c\u003c\u003c 'True \u0026\u0026 False'\n```\n\nThis generates a `dhall-to-json.prof` file in your current directory.\n\n## Build the website\n\nIf you don't need to change the GHCJS code, then switch to the `dhall-lang`\nrepository and follow these instructions instead:\n\n* [`dhall-lang` - Build the website](https://github.com/dhall-lang/dhall-lang/blob/master/nixops/README.md#updating-dhall-langorg)\n\nIf you do need to test changes to the GHCJS code (i.e. the\n[`./dhall-try`](./dhall-try) subdirectory) then stay within this repository, but\nedit the `dhall/dhall-lang` submodule to make the following change:\n\n```diff\ndiff --git a/release.nix b/release.nix\n--- a/dhall/dhall-lang/release.nix\n+++ b/dhall/dhall-lang/release.nix\n       let\n         json = builtins.fromJSON (builtins.readFile ./nixops/dhall-haskell.json);\n \n-        dhall-haskell =\n-          pkgs.fetchFromGitHub {\n-            owner = \"dhall-lang\";\n-\n-            repo = \"dhall-haskell\";\n-\n-            inherit (json) rev sha256 fetchSubmodules;\n-          };\n+        dhall-haskell = ../..;\n \n       in\n         import \"${dhall-haskell}/default.nix\";\n```\n\n... and then build the website by running:\n\n```bash\n$ nix build --file dhall/dhall-lang/release.nix website\n```\n\n... which will incorporate any GHCJS-related changes you make\n\n## Contributing\n\nRead the following guide if you would like to contribute:\n\n* [Contributing to Dhall](https://github.com/dhall-lang/dhall-lang/blob/master/.github/CONTRIBUTING.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhall-lang%2Fdhall-haskell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhall-lang%2Fdhall-haskell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhall-lang%2Fdhall-haskell/lists"}