Stability | experimental |
---|---|
Maintainer | jkarni@gmail.com |
Safe Haskell | None |
Compare TH expressions (or clauses, patterns, etc.) for alpha equivalence. That is, compare for equality modulo the renaming of bound variables.
>>>
areExpEq [| \x -> x |] [| \y -> y |]
True
This can be useful when for instance testing libraries that use Template Haskell: usually correctness is only defined up to alpha equivalence.
N.B.: This package doesn't yet handle type annotations correctly!
Documentation
The main Alpha Equivalence class. @=
is by default defined in terms
of lkEq
. lkEq
is exposed for composability: it is easy to
recursively build AlphaEq
instances from other AlphaEq
instances by
delegating the lookup update to the subinstances.