diff --git a/haskell-src-meta.cabal b/haskell-src-meta.cabal index 5c45b07..c1f3376 100644 --- a/haskell-src-meta.cabal +++ b/haskell-src-meta.cabal @@ -18,7 +18,7 @@ extra-source-files: ChangeLog README.md examples/*.hs library build-depends: base >= 4.6 && < 5, - haskell-src-exts >= 1.18 && < 1.21, + haskell-src-exts >= 1.18 && < 1.22, pretty >= 1.0 && < 1.2, syb >= 0.1 && < 0.8, template-haskell >= 2.8 && < 2.15, @@ -41,7 +41,7 @@ test-suite unit build-depends: HUnit >= 1.2 && < 1.7, base >= 4.5 && < 5, - haskell-src-exts >= 1.17 && < 1.21, + haskell-src-exts >= 1.17 && < 1.22, haskell-src-meta, pretty >= 1.0 && < 1.2, template-haskell >= 2.7 && < 2.15, diff --git a/src/Language/Haskell/Meta/Syntax/Translate.hs b/src/Language/Haskell/Meta/Syntax/Translate.hs index 0dba4f5..aa95cff 100644 --- a/src/Language/Haskell/Meta/Syntax/Translate.hs +++ b/src/Language/Haskell/Meta/Syntax/Translate.hs @@ -314,11 +314,13 @@ instance ToName TyVarBndr where toName (PlainTV n) = n toName (KindedTV n _) = n +#if !MIN_VERSION_haskell_src_exts(1,21,0) instance ToType (Hs.Kind l) where toType (Hs.KindStar _) = StarT toType (Hs.KindFn _ k1 k2) = toType k1 .->. toType k2 toType (Hs.KindParen _ kp) = toType kp toType (Hs.KindVar _ n) = VarT (toName n) +#endif toKind :: Hs.Kind l -> Kind toKind = toType