Skip to content

Commit dfa8286

Browse files
compatibility with template-haskell-2.21.0 and ghc 9.8 (#2542)
1 parent 55aff09 commit dfa8286

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

dhall-bash/dhall-bash.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ Library
2828
Hs-Source-Dirs: src
2929
Build-Depends:
3030
base >= 4.11.0.0 && < 5 ,
31-
bytestring < 0.12,
31+
bytestring < 0.13,
3232
containers < 0.7 ,
3333
dhall >= 1.42.0 && < 1.43,
3434
neat-interpolation < 0.6 ,
3535
shell-escape < 0.3 ,
36-
text >= 0.2 && < 2.1
36+
text >= 0.2 && < 2.2
3737
Exposed-Modules: Dhall.Bash
3838
GHC-Options: -Wall
3939
Default-Language: Haskell2010

dhall/dhall.cabal

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -205,19 +205,19 @@ Flag network-tests
205205
Common common
206206
Build-Depends:
207207
base >= 4.11.0.0 && < 5 ,
208-
aeson >= 1.0.0.0 && < 2.2 ,
208+
aeson >= 1.0.0.0 && < 2.3 ,
209209
aeson-pretty < 0.9 ,
210210
ansi-terminal >= 0.6.3.1 && < 1.1 ,
211211
atomic-write >= 0.2.0.7 && < 0.3 ,
212212
base16-bytestring >= 1.0.0.0 ,
213-
bytestring < 0.12,
213+
bytestring < 0.13,
214214
case-insensitive < 1.3 ,
215215
cborg >= 0.2.0.0 && < 0.3 ,
216216
cborg-json >= 0.2.2.0 && < 0.3 ,
217217
containers >= 0.5.8.0 && < 0.7 ,
218218
contravariant < 1.6 ,
219219
data-fix < 0.4 ,
220-
deepseq < 1.5 ,
220+
deepseq < 1.6 ,
221221
Diff >= 0.2 && < 0.5 ,
222222
directory >= 1.3.0.0 && < 1.4 ,
223223
dotgen >= 0.4.2 && < 0.5 ,
@@ -244,8 +244,8 @@ Common common
244244
repline >= 0.4.0.0 && < 0.5 ,
245245
serialise >= 0.2.0.0 && < 0.3 ,
246246
scientific >= 0.3.0.0 && < 0.4 ,
247-
template-haskell >= 2.13.0.0 && < 2.20,
248-
text >= 0.11.1.0 && < 2.1 ,
247+
template-haskell >= 2.13.0.0 && < 2.22,
248+
text >= 0.11.1.0 && < 2.2 ,
249249
text-manipulate >= 0.2.0.1 && < 0.4 ,
250250
text-short >= 0.1 && < 0.2 ,
251251
th-lift-instances >= 0.1.13 && < 0.2 ,

dhall/src/Dhall/Syntax/Instances/Lift.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
{-# LANGUAGE CPP #-}
12
{-# LANGUAGE DeriveLift #-}
23
{-# LANGUAGE StandaloneDeriving #-}
34

@@ -15,13 +16,17 @@ import Dhall.Syntax.Types
1516
import Dhall.Syntax.Var
1617
import Language.Haskell.TH.Syntax (Lift)
1718

19+
#if !MIN_VERSION_template_haskell(2,21,0)
1820
import qualified Data.Fixed as Fixed
21+
#endif
1922
import qualified Data.Time as Time
2023

2124
deriving instance Lift Time.Day
2225
deriving instance Lift Time.TimeOfDay
2326
deriving instance Lift Time.TimeZone
27+
#if !MIN_VERSION_template_haskell(2,21,0)
2428
deriving instance Lift (Fixed.Fixed a)
29+
#endif
2530
deriving instance Lift Const
2631
deriving instance Lift Var
2732
deriving instance (Lift s, Lift a) => Lift (Binding s a)

dhall/src/Dhall/TH.hs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,9 @@ toDeclaration generateOptions@GenerateOptions{..} haskellTypes typ =
264264

265265
interpretOptions = generateToInterpretOptions generateOptions typ
266266

267-
#if MIN_VERSION_template_haskell(2,17,0)
267+
#if MIN_VERSION_template_haskell(2,21,0)
268+
toTypeVar (V n i) = Syntax.PlainTV (Syntax.mkName (Text.unpack n ++ show i)) Syntax.BndrInvis
269+
#elif MIN_VERSION_template_haskell(2,17,0)
268270
toTypeVar (V n i) = Syntax.PlainTV (Syntax.mkName (Text.unpack n ++ show i)) ()
269271
#else
270272
toTypeVar (V n i) = Syntax.PlainTV (Syntax.mkName (Text.unpack n ++ show i))

0 commit comments

Comments
 (0)