th-alpha
Version 0.2.1.0 revision 0 uploaded by jkarni.
Package meta
- Synopsis
- Alpha equivalence for TH Exp
- Description
Compare TH expressions (or clauses, patterns, etc.) for alpha equivalence. That is, compare for equality modulo the renaming of bound variables.
areExpAEq [| \x -> x |] [| \y -> y |] -- True
do let x = mkName "x" let y = mkName "y" runQ $ (LamE [VarP x] (VarE x)) @= (LamE [VarP y] (VarE y)) -- True
This can be useful when for instance testing libraries that use Template Haskell - usually correctness is only defined up to alpha equivalence.
- Author
- Julian K. Arni
- Bug reports
- https://github.com/jkarni/th-alpha/issues
- Category
- Language
- Copyright
- Julian K. Arni
- Homepage
- https://github.com/jkarni/th-alpha
- Maintainer
- Julian K. Arni <jkarni@gmail.com>
- Package URL
- n/a
- Stability
- alpha