recursion-schemes-ix: Recursion schemes over indexed Functors

[ bsd3, data, library ] [ Propose Tags ]

Please see the README on GitHub at

[Skip to Readme]
Versions [faq]
Change log
Dependencies base (>=4.12 && <4.15), singlethongs (==0.1) [details]
License BSD-3-Clause
Copyright 2020 Skye Soss
Author Skye Soss
Category Data
Home page
Bug tracker
Source repo head: git clone
Uploaded by SkyeSoss at 2020-04-24T13:16:33Z
Distributions NixOS:
Downloads 95 total (5 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs uploaded by user
Build status unknown [no reports yet]


[Index] [Quick Jump]


Maintainer's Corner

For package maintainers and hackage trustees

Readme for recursion-schemes-ix-

[back to package description]


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.


  • 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)


  • 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.


Not written, but haddocks on the github user site.