Skip to content

Commit

Permalink
Add compatibility with template-haskell up to 2.19
Browse files Browse the repository at this point in the history
  • Loading branch information
nuttycom committed Dec 19, 2022
1 parent cc38915 commit 43767ca
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 9 additions & 0 deletions Unsafe/TrueName.hs
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,15 @@ typNames typ = case typ of
#if MIN_VERSION_template_haskell(2,16,0)
ForallVisT _ t -> typNames t
#endif

#if MIN_VERSION_template_haskell(2,17,0)
MulArrowT -> []
#endif

#if MIN_VERSION_template_haskell(2,18,0)
PromotedInfixT s n t -> n : typNames s ++ typNames t
PromotedUInfixT s n t -> n : typNames s ++ typNames t
#endif
{- }}} -}

infoNames :: Info -> [Name]{- {{{ -}
Expand Down
5 changes: 3 additions & 2 deletions true-name.cabal
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
cabal-version: >= 1.10

name: true-name
version: 0.1.0.4
synopsis: Template Haskell hack to violate module abstractions
Expand All @@ -19,7 +21,6 @@ maintainer: [email protected]
copyright: © 2014−2021 Liyang HU
category: Data, Unsafe
build-type: Simple
cabal-version: >= 1.10
stability: experimental
tested-with:
GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3,
Expand All @@ -37,7 +38,7 @@ library
Unsafe.TrueName
build-depends:
base >= 4.5 && < 5,
template-haskell >= 2.7
template-haskell >= 2.7 && < 2.19
ghc-options: -Wall

test-suite sanity
Expand Down

0 comments on commit 43767ca

Please sign in to comment.