Skip to content

Commit e622a88

Browse files
authored
Support GHC 9.10. (#49)
Fixes #48.
1 parent 0b924b8 commit e622a88

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

haskell-src-meta/ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
0.8.14
2+
- Support for GHC 9.10 (by Troels Henriksen)
3+
14
0.8.13
25
- Support for GHC 9.8 (by Vladislav Zavialov)
36

haskell-src-meta/haskell-src-meta.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ author: Matt Morrow
99
copyright: (c) Matt Morrow
1010
maintainer: [email protected]
1111
bug-reports: https://github.com/haskell-party/haskell-src-meta/issues
12-
tested-with: GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.2, GHC == 9.4.1, GHC == 9.6.1, GHC == 9.8.1
12+
tested-with: GHC == 8.2.2, GHC == 8.4.4, GHC == 8.6.5, GHC == 8.8.4, GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.2, GHC == 9.4.1, GHC == 9.6.1, GHC == 9.8.1, GHC == 9.10.1
1313
synopsis: Parse source to template-haskell abstract syntax.
1414
description: The translation from haskell-src-exts abstract syntax
1515
to template-haskell abstract syntax isn't 100% complete yet.
@@ -22,7 +22,7 @@ library
2222
haskell-src-exts >= 1.21 && < 1.24,
2323
pretty >= 1.0 && < 1.2,
2424
syb >= 0.1 && < 0.8,
25-
template-haskell >= 2.12 && < 2.22,
25+
template-haskell >= 2.12 && < 2.23,
2626
th-orphans >= 0.12 && < 0.14
2727

2828
hs-source-dirs: src

haskell-src-meta/src/Language/Haskell/Meta/Extensions.hs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,13 @@ fromExtension e = case e of
367367
TH.ExtendedLiterals -> Nothing
368368
#endif
369369

370+
-- 2.22.0 ---------------------------------------
371+
372+
#if MIN_VERSION_template_haskell(2,22,0)
373+
TH.RequiredTypeArguments -> Nothing
374+
TH.ListTuplePuns -> Nothing
375+
#endif
376+
370377
-- NB: when adding a case here, you may also need to update `toExtension`
371378

372379

haskell-src-meta/src/Language/Haskell/Meta/Syntax/Translate.hs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -798,7 +798,11 @@ instance ToDecs (Exts.Decl l) where
798798
toDecs (Exts.InfixDecl l assoc Nothing ops) =
799799
toDecs (Exts.InfixDecl l assoc (Just 9) ops)
800800
toDecs (Exts.InfixDecl _ assoc (Just fixity) ops) =
801+
#if MIN_VERSION_template_haskell(2,22,0)
802+
map (\op -> TH.InfixD (TH.Fixity fixity dir) TH.NoNamespaceSpecifier (toName op)) ops
803+
#else
801804
map (\op -> TH.InfixD (TH.Fixity fixity dir) (toName op)) ops
805+
#endif
802806
where
803807
dir = case assoc of
804808
Exts.AssocNone _ -> TH.InfixN

0 commit comments

Comments
 (0)