Agda-style Equational Reasoning in Haskell by Data Kinds
What is this?
This library provides means to prove equations in Haskell.
You can prove equations in Agda’s EqReasoning like style.
See blow for an example:
plusZeroL :: SNat m -> Zero :+: m :=: m
plusZeroL SZero = Refl
plusZeroL (SSucc m) =
start (SZero %+ (SSucc m))
=== SSucc (SZero %+ m) `because` plusSuccR SZero m
=== SSucc m `because` succCongEq (plusZeroL m)
It also provides some utility functions to use an induction.
For more detail, please read source codes!
TODOs
Automatic generation for induction schema for any inductive types.
Changes
Changelog
0.7.1.0
Supports GHC 9.10 and 9.12
Drops support for GHC <9.2
0.7.0.2
Supports GHC 9.8
Drops support for GHC <9
0.6.0.3
Support for GHC >= 8.10
0.6.0.2
Adds support for th-desugar-1.11
0.6.0.1
Supports GHC 8.8.
Adds support for th-desugar-1.10 (Thanks: Justin Le @mstksg)