Sellout Dada Save

A total recursion scheme library for Dhall

Project README

dada

built with garnix Packaging status latest packaged version(s)

A total recursion scheme library for Dhall

Recursion schemes allow you to separate recursion from your business logic – making your own operations simpler, more modular, and less error-prone. This library also provides tools for combining your operations in ways that reduce the number of passes over your data and is designed to encourage total (that is, successfully terminating) functions.

documentation

API docs are on GitHub Pages.

development environment

We recommend the following steps to make working in this repository as easy as possible.

direnv allow

This command ensures that any work you do within this repository happens within a consistent reproducible environment. That environment provides various debugging tools, etc. When you leave this directory, you will leave that environment behind, so it doesn’t impact anything else on your system.

git config --local include.path ../.cache/git/config

This will apply our repository-specific Git configuration to git commands run against this repository. It’s lightweight (you should definitely look at it before applying this command) – it does things like telling git blame to ignore formatting-only commits.

building & development

Especially if you are unfamiliar with the Dhall or Haskell ecosystems, there is a Nix build (both with and without a flake). If you are unfamiliar with Nix, Nix adjacent can help you get things working in the shortest time and least effort possible.

if you have nix installed

nix build will build and test the project fully.

nix develop will put you into an environment where the traditional build tooling works. If you also have direnv installed, then you should automatically be in that environment when you're in a directory in this project.

traditional build

The Haskell part of this project is built with Cabal. Individual packages will work with older versions, but ./cabal.package requires Cabal 3.6+.

versioning

In the absolute, almost every change is a breaking change. This section describes how we mitigate that to offer minor updates and revisions.

Here are some common Haskell changes that can have unintended effects:

  • adding instances can conflict with downstream orphans,
  • adding a module can conflict with a module from another package,
  • adding a definition to an existing module can conflict if there are unqualified imports, and
  • even small bugfixes can introduce breaking changes where downstream depended on the broken results.

To mitigate some of those issues for versioning, we assume the following usage:

  • modules should be imported using PackageImports, so that adding modules is a minor change;
  • modules should be imported qualified, so that adding definitions is a minor change;
  • adding instances can't be mitigated in the same way, and it's not uncommon for downstream libraries to add orphans instances when they're omitted from upstream libraries. However, since these conflicts can only happen via direct dependencies, and represent an explicit downstream workaround, it’s reasonable to expect a quick downstream update to remove or conditionalize the workaround. So, this is considered a minor major change;
  • deprecation is considered a revision change, however it will often be paired with minor changes. -Werror can cause this to fail, but published libraries shouldn't be compiled with -Werror.

comparisons

Other projects similar to this one, and how they differ.

Open Source Agenda is not affiliated with "Sellout Dada" Project. README Source: sellout/dada
Stars
64
Open Issues
4
Last Commit
4 months ago
Repository
License

Open Source Agenda Badge

Open Source Agenda Rating