recursion-schemes-ix: Recursion schemes over indexed Functors

[ bsd3, data, library ] [ Propose Tags ] [ Report a vulnerability ]
Versions [RSS] 0.1.0.0
Change log ChangeLog.md
Dependencies base (>=4.12 && <4.15), singlethongs (==0.1) [details]
Tested with ghc ==8.6.5, ghc ==8.8.3, ghc ==8.10.1, ghcjs ==8.6.0.1
License BSD-3-Clause
Copyright 2020 Skye Soss
Author Skye Soss
Maintainer skyler.soss@gmail.com
Category Data
Home page https://github.com/Skyb0rg007/recursion-schemes-ix#readme
Bug tracker https://github.com/Skyb0rg007/recursion-schemes-ix/issues
Source repo head: git clone https://github.com/Skyb0rg007/recursion-schemes-ix
Uploaded by SkyeSoss at 2020-04-24T13:16:33Z
Distributions
Downloads 342 total (8 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for recursion-schemes-ix-0.1.0.0

[back to package description]

recursion-schemes-ix

Recursion schemes over indexed datatypes

Heavily inspired by multirec, this library uses PolyKinds and SingI constraints to achieve the same dependent typing as multirec.

This library defines the IFunctor typeclass and recursion-schemes on IFunctors.

Goals:

  • Minimal dependencies
    • This library depends only on singlethongs, which in turn only depends on template-haskell. As a result, it should be easy to include in any project
  • GHCJS compatibility
    • This package is used in a compiler that I want to be able to run in the browser
  • Ease of use
    • Once everything is set-up, writing a recursion-scheme should not be overly complex (looking at you, mulrirec)

Non-Goals:

  • Eliminating boilerplate
    • This library requires hand-written IShow, IRead, IEq, IOrd, ITraversable instances. I also recommend writing pattern synonyms to remove the IFix constructor. Writing these can be a pain, but its only required once for the main data structure, and one IFunctor instance whenever you write a dependent recursion-scheme.
  • Speed
    • The code in the library mimics the recurion-schemes library almost directly, simply lifting everything up from * to k -> *. In a future release, INLINE pragmas will be added and possibly benchmarked.

Documentation

Not written, but haddocks on the github user site.