th-alpha: Alpha equivalence for TH Exp

[ bsd3, language, library ] [ Propose Tags ]

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




Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],,,,,,
Dependencies base (>=4 && <5), containers, mmorph (>1 && <2), mtl (>=2 && <3), template-haskell, th-desugar (>=1.4 && <1.7), transformers [details]
License BSD-3-Clause
Copyright Julian K. Arni
Author Julian K. Arni
Maintainer Julian K. Arni <>
Category Language
Home page
Bug tracker
Source repo head: git clone
Uploaded by jkarni at 2016-07-01T13:57:23Z
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 4677 total (23 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2016-11-22 [all 1 reports]