Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/ghc-9.2' into aa/aeson-2.1
Browse files Browse the repository at this point in the history
* origin/ghc-9.2:
  Support GHC 9.2
  • Loading branch information
ali-abrar committed Jul 3, 2023
2 parents 517f51f + 4d250c9 commit 27ca4cb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
build:
strategy:
matrix:
ghc: ['8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.0.2', '9.2.5', '9.4.5', '9.6.1']
ghc: ['8.4.4', '8.6.5', '8.8.4', '8.10.7', '9.0.2', '9.2.5']
os: ['ubuntu-latest', 'macos-latest']
runs-on: ${{ matrix.os }}

Expand Down
1 change: 1 addition & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
## 0.2.5.2 - 2022-07-03

* Loosen version bounds
* Support GHC 9.2

## 0.2.5.1 - 2022-01-04

Expand Down
4 changes: 2 additions & 2 deletions aeson-gadt-th.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ flag build-readme

library
exposed-modules: Data.Aeson.GADT.TH
build-depends: base >= 4.8 && < 4.16
build-depends: base >= 4.8 && < 4.17
, aeson >= 1.3 && < 2.3
, containers >= 0.5 && < 0.7
, dependent-sum >= 0.4 && < 0.8
, transformers >= 0.5 && < 0.6
, template-haskell >= 2.11.0 && < 2.18
, template-haskell >= 2.11.0 && < 2.19
, th-abstraction >= 0.4 && < 0.5
if impl(ghc < 8.2)
build-depends: dependent-sum < 0.6.2.2
Expand Down
9 changes: 8 additions & 1 deletion src/Data/Aeson/GADT/TH.hs
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,14 @@ conMatches clsName topVars ixVar c = do
[InstanceD _ cxt (AppT _className (AppT (ConT _some) ityp)) _] -> do
sub <- lift $ unifyTypes [ityp, tn]
tellCxt $ applySubstitution sub cxt
return (ConP 'Some [VarP x], VarE x)
return ( ConP
'Some
#if MIN_VERSION_template_haskell(2,18,0)
[]
#endif
[VarP x]
, VarE x
)
_ -> error $ "The following instances of " ++ show clsName ++ " for " ++ show (ppr [AppT (ConT ''Some) tn]) ++ " exist (rigids: " ++ unwords (map show $ Set.toList rigidVars) ++ "), and I don't know which to pick:\n" ++ unlines (map (show . ppr) insts)
_ -> do
demandInstanceIfNecessary
Expand Down

0 comments on commit 27ca4cb

Please sign in to comment.