Skip to content

Commit

Permalink
Merge pull request #1 from DanBurton/galenhuntington-patch1
Browse files Browse the repository at this point in the history
 Support haskell-src-exts 1.21
  • Loading branch information
DanBurton authored Feb 18, 2019
2 parents 7b2c816 + cb315dc commit 0d6a61f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions haskell-src-meta.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions src/Language/Haskell/Meta/Syntax/Translate.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0d6a61f

Please sign in to comment.