th-constraint-compat-0.0.1.0/0000755000000000000000000000000013166066407014123 5ustar0000000000000000th-constraint-compat-0.0.1.0/th-constraint-compat.cabal0000644000000000000000000000347713166066407021200 0ustar0000000000000000 name: th-constraint-compat version: 0.0.1.0 synopsis: Compatibility for type constraint template description: This package provides compatibe interfaces for type constraint template license: BSD3 license-file: LICENSE author: Kei Hibino maintainer: ex8k.hibino@gmail.com copyright: Copyright (c) 2017 Kei Hibino category: Language build-type: Simple cabal-version: >=1.10 tested-with: GHC == 8.2.1 , GHC == 8.0.1, GHC == 8.0.2 , GHC == 7.10.1, GHC == 7.10.2, GHC == 7.10.3 , GHC == 7.8.1, GHC == 7.8.2, GHC == 7.8.3, GHC == 7.8.4 , GHC == 7.6.1, GHC == 7.6.2, GHC == 7.6.3 , GHC == 7.4.1, GHC == 7.4.2 flag template-haskell-209 description: If true, use template-haskell 2.9 or older, otherwise use template-haskell 2.10 or newer. default: False library exposed-modules: Language.Haskell.TH.Compat.Constraint if flag(template-haskell-209) other-modules: Language.Haskell.TH.Compat.Constraint.V209 build-depends: template-haskell >=2.7 && <2.10 else other-modules: Language.Haskell.TH.Compat.Constraint.Current build-depends: template-haskell >=2.10 build-depends: base <5 , containers other-extensions: CPP hs-source-dirs: src default-language: Haskell2010 ghc-options: -Wall source-repository head type: git location: https://github.com/khibino/haskell-th-constraint-compat source-repository head type: mercurial location: https://bitbucket.org/khibino/haskell-th-constraint-compat th-constraint-compat-0.0.1.0/LICENSE0000644000000000000000000000275613166066407015142 0ustar0000000000000000Copyright (c) 2017, Kei Hibino All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Kei Hibino nor the names of other contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. th-constraint-compat-0.0.1.0/Setup.hs0000644000000000000000000000005613166066407015560 0ustar0000000000000000import Distribution.Simple main = defaultMain th-constraint-compat-0.0.1.0/src/0000755000000000000000000000000013166066407014712 5ustar0000000000000000th-constraint-compat-0.0.1.0/src/Language/0000755000000000000000000000000013166066407016435 5ustar0000000000000000th-constraint-compat-0.0.1.0/src/Language/Haskell/0000755000000000000000000000000013166066407020020 5ustar0000000000000000th-constraint-compat-0.0.1.0/src/Language/Haskell/TH/0000755000000000000000000000000013166066407020333 5ustar0000000000000000th-constraint-compat-0.0.1.0/src/Language/Haskell/TH/Compat/0000755000000000000000000000000013166066407021556 5ustar0000000000000000th-constraint-compat-0.0.1.0/src/Language/Haskell/TH/Compat/Constraint.hs0000644000000000000000000000110313166066407024231 0ustar0000000000000000{-# LANGUAGE CPP #-} -- | -- Module : Language.Haskell.TH.Compat.Constraint -- Copyright : 2017 Kei Hibino -- License : BSD3 -- -- Maintainer : ex8k.hibino@gmail.com -- Stability : experimental -- Portability : unknown -- -- This module provides compatibility definitions of -- constraint context template for before temaplate-haskell-2.9 module Language.Haskell.TH.Compat.Constraint ( classP, ) where #if MIN_VERSION_template_haskell(2,10,0) import Language.Haskell.TH.Compat.Constraint.Current #else import Language.Haskell.TH.Compat.Constraint.V209 #endif th-constraint-compat-0.0.1.0/src/Language/Haskell/TH/Compat/Constraint/0000755000000000000000000000000013166066407023702 5ustar0000000000000000th-constraint-compat-0.0.1.0/src/Language/Haskell/TH/Compat/Constraint/Current.hs0000644000000000000000000000045313166066407025662 0ustar0000000000000000module Language.Haskell.TH.Compat.Constraint.Current ( classP, ) where import Language.Haskell.TH (Q, Name, Type, Pred, conT, appT) -- | type-class predicate context. -- definition to keep backward comatiblity. classP :: Name -> [Q Type] -> Q Pred classP cla tys = foldl appT (conT cla) tys th-constraint-compat-0.0.1.0/src/Language/Haskell/TH/Compat/Constraint/V209.hs0000644000000000000000000000015513166066407024677 0ustar0000000000000000module Language.Haskell.TH.Compat.Constraint.V209 ( classP, ) where import Language.Haskell.TH (classP)