Coder Social home page Coder Social logo

dada's Introduction

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.

dada's People

Contributors

fintanh avatar sellout avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dada's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/build.yml
.github/workflows/flakehub-publish.yml
  • actions/checkout v4
.github/workflows/pages.yml
nix
flake.nix
  • nixpkgs release-23.11

  • Check this box to trigger a request for Renovate to run again on this repository

Licensing?

Would you be open to something more like the LGPL (I think there's an equivalent for the AGPL)? This would effectively allow closed-source clients of this as a library, but any downstream modifications or improvements to the library itself would have to be shared back with upstream. (IANAL.)

convention: types and type constructors capitalized?

I was wondering (while trying to understand the code) whether it would make sense to have a convention that types and type constructors (intuitively all files that end in -> ∀ …) are given (file) names starting with a capital letter?

e.g. I wondered what the difference between /recursive and /Mu/recursive was, until I saw that inside the latter the former is imported in a type annotation. I’d rename the former to /Recursive instead, to make them easier to distinguish. Same with all other files that evaluate to types.

Natural - eq, gt, etc?

You have lt in here. I'm not sure what the philosophy of this collection is, but would it make sense to also include eq, gt and similar? At least these two can be trivially implemented using lt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.