typelevel-rewrite-rules VS constraint-rules

Compare typelevel-rewrite-rules vs constraint-rules and see what are their differences.


rewrite rules for type-level equalities (by gelisam)


Extend GHC's type checker with user-defined rules, without writing a type checker plugin. (by YellPika)
Our great sponsors
  • Onboard AI - Learn any GitHub repo in 59 seconds
  • InfluxDB - Collect and Analyze Billions of Data Points in Real Time
  • Revelo Payroll - Free Global Payroll designed for tech teams
  • SonarLint - Clean code begins in your IDE with SonarLint
typelevel-rewrite-rules constraint-rules
4 1
62 16
- -
0.0 1.8
about 1 month ago about 2 years ago
Haskell Haskell
LicenseRef-PublicDomain BSD 3-clause "New" or "Revised" License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.


Posts with mentions or reviews of typelevel-rewrite-rules. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-09-10.
  • [ANN/RFC] constraint-rules
    3 projects | /r/haskell | 10 Sep 2021
    Nice! Thanks for including a comparison with my package typelevel-rewrite-rules. Since my package indeed struggles with infinite loops introduced by self-triggering rewrite rules, I would like to better understand why your package doesn't suffer from that same problem.
  • Transpiling to GHC Core language
    4 projects | /r/haskell | 30 Apr 2021
    When writing a typechecker plugin, you can eliminate constraints from the user's program by providing an implementation of the corresponding dictionary. The way you provide that dictionary to ghc is by providing a core expression; for example, this evCast futureDict co expression has type EvTerm, whose first constructor takes an EvExpr, which is a synonym for CoreExpr.
  • [GHC Proposals] GHC Maintainer preview
    4 projects | /r/haskell | 3 Apr 2021
    Until then, I guess we can simply poll. Here's a GitHub Action I wrote today which checks if the latest report for a given package includes a failure: https://github.com/gelisam/typelevel-rewrite-rules/blob/main/.github/workflows/check-hackage-matrix.yml


Posts with mentions or reviews of constraint-rules. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-09-10.
  • [ANN/RFC] constraint-rules
    3 projects | /r/haskell | 10 Sep 2021
    constraint-rules provides a way to extend GHC's type checker with custom rules without having to write your own type checker plugin. See https://github.com/YellPika/constraint-rules for more info and some example code.

What are some alternatives?

When comparing typelevel-rewrite-rules and constraint-rules you can also consider the following projects:

funspection - Type-level function utilities

uom-plugin - Units of measure as a GHC typechecker plugin

type-eq - Type equality evidence you can carry around


type-level-numbers - Implementation of type level natural and signed integer numbers in haskell using type families.