The th-alpha package

[ Tags: 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
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.

Properties

Versions 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.2.0.0, 0.2.0.1, 0.2.0.2, 0.2.1.0
Dependencies base (==4.*), containers, mmorph (>1 && <2), mtl (==2.*), template-haskell, th-desugar (>=1.4 && <1.7), transformers [details]
License BSD3
Copyright Julian K. Arni
Author Julian K. Arni
Maintainer Julian K. Arni <jkarni@gmail.com>
Category Language
Home page https://github.com/jkarni/th-alpha
Bug tracker https://github.com/jkarni/th-alpha/issues
Source repository head: git clone https://github.com/jkarni/th-alpha
Uploaded Fri Jul 1 13:57:23 UTC 2016 by jkarni
Distributions NixOS:0.2.1.0
Downloads 1114 total (21 in the last 30 days)
Rating 0.0 (0 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2016-11-22 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees