packages feed

th-alpha-0.2.1.0: th-alpha.cabal

-- Initial th-alpha.cabal generated by cabal init.  For further
-- documentation, see http://haskell.org/cabal/users-guide/

name:                th-alpha
version:             0.2.1.0
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.

license:             BSD3
license-file:        LICENSE
author:              Julian K. Arni
maintainer:          Julian K. Arni <jkarni@gmail.com>
copyright:           Julian K. Arni
category:            Language
build-type:          Simple
cabal-version:       >=1.10
stability:           alpha
homepage:            https://github.com/jkarni/th-alpha
bug-reports:         https://github.com/jkarni/th-alpha/issues

source-repository head
  type:              git
  location:          https://github.com/jkarni/th-alpha

library
  exposed-modules:     Language.Haskell.TH.Alpha
  build-depends:       base >=4 && <5
                     , template-haskell
                     , containers
                     , th-desugar >= 1.4 && < 1.7
                     , mtl >=2 && <3
                     , transformers
                     , mmorph > 1 && < 2
  hs-source-dirs:      src
  ghc-options:         -Wall
  default-language:    Haskell2010

Test-Suite test
  type:                exitcode-stdio-1.0
  hs-source-dirs:      tests
  ghc-options:         -Wall
  main-is:             tests.hs
  build-depends:       base >= 4 && < 5
                     , th-alpha
                     , template-haskell
                     , tasty >= 0.8
                     , tasty-hunit
                     , tasty-quickcheck
                     , derive
  default-language:    Haskell2010