diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2f0a2ab6..1bc37a0e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: - name: Convert coverage output run: | - HPC_LCOV_VERSION=1.1.1 + HPC_LCOV_VERSION=1.2.0 curl -fsSL \ "https://github.com/brandonchinn178/hpc-lcov/releases/download/v${HPC_LCOV_VERSION}/hpc-lcov-${HPC_LCOV_VERSION}-linux-x86_64" \ -o /usr/local/bin/hpc-lcov @@ -42,11 +42,11 @@ jobs: strategy: matrix: ghc_version: - - '9.4' - - '9.6' - '9.8' + - '9.10' + - '9.12' include: - - ghc_version: 9.4.1 + - ghc_version: 9.8.1 oldest: true name: ghc_compat_test (${{ matrix.ghc_version }}) diff --git a/.github/workflows/ghc-compat-test.yml b/.github/workflows/ghc-compat-test.yml index 40de2ed1..c3009adb 100644 --- a/.github/workflows/ghc-compat-test.yml +++ b/.github/workflows/ghc-compat-test.yml @@ -18,10 +18,11 @@ jobs: - id: setup name: Set up GHC ${{ inputs.ghc_version }} - uses: brandonchinn178/haskell-actions-setup@3f2715436c49e3e1c7b19450d595348512bbe8eb + uses: haskell-actions/setup@v2 with: ghc-version: ${{ inputs.ghc_version }} - ghcup-release-channels: https://ghc.gitlab.haskell.org/ghcup-metadata/ghcup-nightlies-0.0.7.yaml + cabal-version: '3.10' + ghcup-release-channel: https://ghc.gitlab.haskell.org/ghcup-metadata/ghcup-nightlies-0.0.7.yaml - name: Configure the build run: @@ -31,12 +32,37 @@ jobs: --enable-bench --test-options=--color=always --test-show-details=streaming + - + # TODO: remove when packages are updated + name: Allow building deps with GHC 9.12 + run: + cabal configure --enable-append + --allow-newer=aeson:ghc-prim + --allow-newer=aeson:template-haskell + --allow-newer=binary-orphans:base + --allow-newer=haskell-src-meta:template-haskell + --allow-newer=indexed-traversable-instances:base + --allow-newer=indexed-traversable:base + --allow-newer=integer-conversion:base + --allow-newer=microstache:base + --allow-newer=scientific:base + --allow-newer=scientific:template-haskell + --allow-newer=semialign:base + --allow-newer=text:deepseq + --allow-newer=these:base + --allow-newer=time-compat:base + --allow-newer=time-compat:time + --allow-newer=unordered-containers:template-haskell + --allow-newer=uuid-types:template-haskell - if: ${{ inputs.oldest }} name: Use oldest dependencies + # https://github.com/pcapriotti/optparse-applicative/issues/497 run: cabal configure --enable-append --prefer-oldest + --constraint='prettyprinter-ansi-terminal >= 1.1.2' + --constraint='haskell-src-meta >= 0.8.13' - if: ${{ inputs.ghc_version == 'latest-nightly' }} name: Add head.hackage diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b4cfe8b..54026119 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Unreleased +# v1.4.3.0 + +* Drop support for GHC 9.4 + 9.6 +* Add support for GHC 9.10 + 9.12 + # v1.4.2.1 * Fix benchmarks for GHC 9.8 diff --git a/DEVELOPER.md b/DEVELOPER.md index c506b51f..d3732a1d 100644 --- a/DEVELOPER.md +++ b/DEVELOPER.md @@ -9,6 +9,9 @@ stack build # with haddock stack build --haddock + +# with cabal +cabal build --ghc-options -Werror ``` ## Lint @@ -28,6 +31,10 @@ All tests must pass CI in order for your PR to be accepted. ```bash stack test + +# Note: use the global GHC; integration tests will not work with +# --with-compiler set differently +cabal exec -- cabal test ``` # Documentation diff --git a/aeson-schemas.cabal b/aeson-schemas.cabal index a8f5d34d..4a5f7866 100644 --- a/aeson-schemas.cabal +++ b/aeson-schemas.cabal @@ -1,11 +1,11 @@ cabal-version: >= 1.10 --- This file has been generated from package.yaml by hpack version 0.36.0. +-- This file has been generated from package.yaml by hpack version 0.37.0. -- -- see: https://github.com/sol/hpack name: aeson-schemas -version: 1.4.2.1 +version: 1.4.3.0 synopsis: Easily consume JSON data on-demand with type-safety description: Parse JSON data easily and safely without defining new data types. Useful for deeply nested JSON data, which is difficult to parse using the default @@ -39,10 +39,9 @@ extra-source-files: test/goldens/getqq_no_operators.golden test/goldens/getqq_ops_after_list.golden test/goldens/getqq_ops_after_tuple.golden - test/goldens/ghc/9.4/getqq_missing_key.golden - test/goldens/ghc/9.6/getqq_missing_key.golden + test/goldens/ghc/9.10/getqq_missing_key.golden + test/goldens/ghc/9.12/getqq_missing_key.golden test/goldens/ghc/9.8/getqq_missing_key.golden - test/goldens/ghc/9.9/getqq_missing_key.golden test/goldens/README_Quickstart.golden test/goldens/schemaqq_key_with_invalid_character.golden test/goldens/schemaqq_key_with_trailing_escape.golden @@ -84,7 +83,7 @@ library , first-class-families <0.9 , hashable <1.6 , megaparsec <10 - , template-haskell <2.22 + , template-haskell <2.24 , text <2.2 , unordered-containers <0.3 default-language: Haskell2010 @@ -125,7 +124,6 @@ test-suite aeson-schemas-test , base , deepseq , filepath - , hint , interpolate , process , raw-strings-qq diff --git a/bench/Utils/DeepSeq.hs b/bench/Utils/DeepSeq.hs index 52d7a089..ee2724cd 100644 --- a/bench/Utils/DeepSeq.hs +++ b/bench/Utils/DeepSeq.hs @@ -51,22 +51,14 @@ instance NFData Type instance NFData TypeFamilyHead instance NFData TyLit instance NFData TySynEqn - -#if MIN_VERSION_template_haskell(2,17,0) instance NFData Specificity -#endif - -#if MIN_VERSION_template_haskell(2,17,0) -instance NFData flag => NFData (TyVarBndr flag) -#else -instance NFData TyVarBndr -#endif - -#if MIN_VERSION_template_haskell(2,21,0) +instance (NFData flag) => NFData (TyVarBndr flag) instance NFData BndrVis -#endif - instance NFData Bytes +#if MIN_VERSION_template_haskell(2,22,0) +instance NFData NamespaceSpecifier +#endif + instance NFData (ForeignPtr a) where rnf = rwhnf diff --git a/package.yaml b/package.yaml index cdb2e13f..4d76ab34 100644 --- a/package.yaml +++ b/package.yaml @@ -1,5 +1,5 @@ name: aeson-schemas -version: 1.4.2.1 +version: 1.4.3.0 verbatim: cabal-version: '>= 1.10' license: BSD3 @@ -47,7 +47,7 @@ library: - first-class-families < 0.9 - hashable < 1.6 - megaparsec < 10 - - template-haskell < 2.22 + - template-haskell < 2.24 - text < 2.2 - unordered-containers < 0.3 @@ -62,7 +62,6 @@ tests: - base - deepseq - filepath - - hint - interpolate - process - QuickCheck diff --git a/src/Data/Aeson/Schema/TH/Utils.hs b/src/Data/Aeson/Schema/TH/Utils.hs index b1052ce0..83aed884 100644 --- a/src/Data/Aeson/Schema/TH/Utils.hs +++ b/src/Data/Aeson/Schema/TH/Utils.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE LambdaCase #-} @@ -197,10 +196,8 @@ stripKinds ty = AppT ty1 ty2 -> AppT (stripKinds ty1) (stripKinds ty2) InfixT ty1 name ty2 -> InfixT (stripKinds ty1) name (stripKinds ty2) UInfixT ty1 name ty2 -> UInfixT (stripKinds ty1) name (stripKinds ty2) -#if MIN_VERSION_template_haskell(2,19,0) PromotedInfixT ty1 name ty2 -> PromotedInfixT (stripKinds ty1) name (stripKinds ty2) PromotedUInfixT ty1 name ty2 -> PromotedUInfixT (stripKinds ty1) name (stripKinds ty2) -#endif ParensT ty1 -> ParensT (stripKinds ty1) ImplicitParamT str ty1 -> ImplicitParamT str (stripKinds ty1) @@ -212,9 +209,7 @@ stripKinds ty = UnboxedTupleT _ -> ty UnboxedSumT _ -> ty ArrowT -> ty -#if MIN_VERSION_template_haskell(2,17,0) MulArrowT -> ty -#endif EqualityT -> ty ListT -> ty PromotedTupleT _ -> ty diff --git a/src/Data/Aeson/Schema/Utils/Compat.hs b/src/Data/Aeson/Schema/Utils/Compat.hs index 7fc17b7c..020c16e9 100644 --- a/src/Data/Aeson/Schema/Utils/Compat.hs +++ b/src/Data/Aeson/Schema/Utils/Compat.hs @@ -13,7 +13,10 @@ module Data.Aeson.Schema.Utils.Compat ( unions, ) where +#if !MIN_VERSION_base(4,20,0) import Data.List (foldl') +#endif + import Data.Text (Text) import Prelude hiding (lookup) diff --git a/stack.yaml b/stack.yaml index d45600cf..ede9ce05 100644 --- a/stack.yaml +++ b/stack.yaml @@ -1 +1,4 @@ -resolver: lts-22.28 +resolver: nightly-2024-12-20 + +extra-deps: + - th-test-utils-1.2.2 diff --git a/stack.yaml.lock b/stack.yaml.lock index 0dd02f64..0ee45fb9 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -3,10 +3,17 @@ # For more information, please see the documentation at: # https://docs.haskellstack.org/en/stable/lock_files -packages: [] +packages: +- completed: + hackage: th-test-utils-1.2.2@sha256:d7b02eb9d2613e5e624298826ba03d4c11e18fa2fb8d4e378569224ae687fc4e,2193 + pantry-tree: + sha256: eacb82118c7a96fc0e4ee9a45e3283155987b13fa21b8f65954acb1a55cdf50f + size: 620 + original: + hackage: th-test-utils-1.2.2 snapshots: - completed: - sha256: 87da71cb0ae9ee1ea1bf51a8eb9812f39f779be76abc0a3c926defd8afda05d1 - size: 719139 - url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/28.yaml - original: lts-22.28 + sha256: 2413f1dbf803da9cab3b6970d868cf7cd4c013b8776dee3cebd8b8ecbf85514c + size: 619614 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/nightly/2024/12/20.yaml + original: nightly-2024-12-20 diff --git a/test/TestUtils.hs b/test/TestUtils.hs index 3008eb3d..917818ba 100644 --- a/test/TestUtils.hs +++ b/test/TestUtils.hs @@ -22,6 +22,7 @@ module TestUtils ( testGoldenIO, testParseError, ghcGoldenDir, + ghcVersion, ) where import Data.Aeson (FromJSON (..), Value, eitherDecode) @@ -34,6 +35,7 @@ import qualified Data.Text.IO as Text import qualified Data.Text.Lazy as TextL import qualified Data.Text.Lazy.Encoding as TextL import Data.Typeable (Typeable, typeRep) +import Data.Version (Version, makeVersion, showVersion, versionBranch) import Language.Haskell.TH (ExpQ) import Language.Haskell.TH.Quote (QuasiQuoter (..)) import System.FilePath (()) @@ -111,11 +113,9 @@ testParseError name fp s = goldenTest name getExpected getActual cmp update -- | The directory to put GHC version-specific golden files. ghcGoldenDir :: FilePath -ghcGoldenDir = "ghc" ghcVersion +ghcGoldenDir = "ghc" showVersion ghcMinorVersion where - ghcVersion = - Text.unpack - . Text.intercalate "." - . take 2 - . Text.splitOn "." - $ __GLASGOW_HASKELL_FULL_VERSION__ + ghcMinorVersion = makeVersion . take 2 . versionBranch $ ghcVersion + +ghcVersion :: Version +ghcVersion = makeVersion . map (read . Text.unpack) $ Text.splitOn "." __GLASGOW_HASKELL_FULL_VERSION__ diff --git a/test/TestUtils/DeepSeq.hs b/test/TestUtils/DeepSeq.hs index c61fe2a9..bb289371 100644 --- a/test/TestUtils/DeepSeq.hs +++ b/test/TestUtils/DeepSeq.hs @@ -51,22 +51,14 @@ instance NFData Type instance NFData TypeFamilyHead instance NFData TyLit instance NFData TySynEqn - -#if MIN_VERSION_template_haskell(2,17,0) instance NFData Specificity -#endif - -#if MIN_VERSION_template_haskell(2,17,0) -instance NFData flag => NFData (TyVarBndr flag) -#else -instance NFData TyVarBndr -#endif - -#if MIN_VERSION_template_haskell(2,20,0) && __GLASGOW_HASKELL__ >= 907 +instance (NFData flag) => NFData (TyVarBndr flag) instance NFData BndrVis -#endif - instance NFData Bytes +#if MIN_VERSION_template_haskell(2,22,0) +instance NFData NamespaceSpecifier +#endif + instance NFData (ForeignPtr a) where rnf = rwhnf diff --git a/test/Tests/GetQQ.hs b/test/Tests/GetQQ.hs index a33888be..d51152ce 100644 --- a/test/Tests/GetQQ.hs +++ b/test/Tests/GetQQ.hs @@ -1,4 +1,3 @@ -{-# LANGUAGE CPP #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} @@ -13,13 +12,15 @@ module Tests.GetQQ where import Control.DeepSeq (deepseq) -import Control.Exception (SomeException, displayException, try) +import Control.Exception (SomeException, try) import Data.Aeson (FromJSON (..), ToJSON (..), withText) import Data.Aeson.QQ (aesonQQ) import Data.Text (Text) import qualified Data.Text as Text -import qualified Language.Haskell.Interpreter as Hint +import Data.Version (makeVersion) +import System.Exit (ExitCode (..)) import System.FilePath (()) +import System.Process (readProcessWithExitCode) import Test.Tasty import Test.Tasty.HUnit import Test.Tasty.QuickCheck @@ -27,7 +28,7 @@ import Test.Tasty.QuickCheck import Data.Aeson.Schema (Object, schema) import Data.Aeson.Schema.TH (mkEnum) import Data.Aeson.Schema.Utils.Sum (SumType (..)) -import TestUtils (ghcGoldenDir, parseObject, testGoldenIO, testParseError) +import TestUtils (ghcGoldenDir, ghcVersion, parseObject, testGoldenIO, testParseError) import Tests.GetQQ.TH mkEnum "Greeting" ["HELLO", "GOODBYE"] @@ -401,10 +402,24 @@ testCompileTimeErrors = ] where testDir = "test/wont-compile/" - getCompileError fp = - Hint.runInterpreter (Hint.loadModules [fp]) >>= \case - Left e -> pure $ displayException e - Right _ -> error "Compilation unexpectedly succeeded" + getCompileError fp = do + let args = + concat + [ [fp] + , -- https://gitlab.haskell.org/ghc/ghc/-/issues/25602 + if ghcVersion < makeVersion [9, 10] + then [] + else ["-package", "ghc-internal"] + ] + (code, stdout, stderr) <- readProcessWithExitCode "ghc" args "" + case code of + ExitFailure _ -> pure stderr + ExitSuccess -> + error . unlines $ + [ "Unexpectedly succeeded:" + , stdout + , stderr + ] {- Helpers -} diff --git a/test/goldens/ghc/9.10/getqq_missing_key.golden b/test/goldens/ghc/9.10/getqq_missing_key.golden new file mode 100644 index 00000000..cdaee539 --- /dev/null +++ b/test/goldens/ghc/9.10/getqq_missing_key.golden @@ -0,0 +1,50 @@ +test/wont-compile/GetMissingKey.hs:17:15: error: [GHC-64725] + • Key 'missing' does not exist in the following schema: + '[ '(Data.Aeson.Schema.Key.NormalKey "foo", + Data.Aeson.Schema.Type.SchemaScalar Bool)] + • In the second argument of ‘(.)’, namely + ‘Data.Aeson.Schema.Internal.getKey + (GHC.Internal.Data.Proxy.Proxy :: + GHC.Internal.Data.Proxy.Proxy "missing")’ + In the expression: + (id + . Data.Aeson.Schema.Internal.getKey + (GHC.Internal.Data.Proxy.Proxy :: + GHC.Internal.Data.Proxy.Proxy "missing")) + o + In an equation for ‘result’: + result + = ((id + . Data.Aeson.Schema.Internal.getKey + (GHC.Internal.Data.Proxy.Proxy :: + GHC.Internal.Data.Proxy.Proxy "missing")) + o) + | +17 | result = [get| o.missing |] + | ^^^^^^^^^^^^^ + +test/wont-compile/GetMissingKey.hs:17:15: error: [GHC-64725] + • Key 'missing' does not exist in the following schema: + '[ '(Data.Aeson.Schema.Key.NormalKey "foo", + Data.Aeson.Schema.Type.SchemaScalar Bool)] + • In the second argument of ‘(.)’, namely + ‘Data.Aeson.Schema.Internal.getKey + (GHC.Internal.Data.Proxy.Proxy :: + GHC.Internal.Data.Proxy.Proxy "missing")’ + In the expression: + (id + . Data.Aeson.Schema.Internal.getKey + (GHC.Internal.Data.Proxy.Proxy :: + GHC.Internal.Data.Proxy.Proxy "missing")) + o + In an equation for ‘result’: + result + = ((id + . Data.Aeson.Schema.Internal.getKey + (GHC.Internal.Data.Proxy.Proxy :: + GHC.Internal.Data.Proxy.Proxy "missing")) + o) + | +17 | result = [get| o.missing |] + | ^^^^^^^^^^^^^ + diff --git a/test/goldens/ghc/9.12/getqq_missing_key.golden b/test/goldens/ghc/9.12/getqq_missing_key.golden new file mode 100644 index 00000000..cdaee539 --- /dev/null +++ b/test/goldens/ghc/9.12/getqq_missing_key.golden @@ -0,0 +1,50 @@ +test/wont-compile/GetMissingKey.hs:17:15: error: [GHC-64725] + • Key 'missing' does not exist in the following schema: + '[ '(Data.Aeson.Schema.Key.NormalKey "foo", + Data.Aeson.Schema.Type.SchemaScalar Bool)] + • In the second argument of ‘(.)’, namely + ‘Data.Aeson.Schema.Internal.getKey + (GHC.Internal.Data.Proxy.Proxy :: + GHC.Internal.Data.Proxy.Proxy "missing")’ + In the expression: + (id + . Data.Aeson.Schema.Internal.getKey + (GHC.Internal.Data.Proxy.Proxy :: + GHC.Internal.Data.Proxy.Proxy "missing")) + o + In an equation for ‘result’: + result + = ((id + . Data.Aeson.Schema.Internal.getKey + (GHC.Internal.Data.Proxy.Proxy :: + GHC.Internal.Data.Proxy.Proxy "missing")) + o) + | +17 | result = [get| o.missing |] + | ^^^^^^^^^^^^^ + +test/wont-compile/GetMissingKey.hs:17:15: error: [GHC-64725] + • Key 'missing' does not exist in the following schema: + '[ '(Data.Aeson.Schema.Key.NormalKey "foo", + Data.Aeson.Schema.Type.SchemaScalar Bool)] + • In the second argument of ‘(.)’, namely + ‘Data.Aeson.Schema.Internal.getKey + (GHC.Internal.Data.Proxy.Proxy :: + GHC.Internal.Data.Proxy.Proxy "missing")’ + In the expression: + (id + . Data.Aeson.Schema.Internal.getKey + (GHC.Internal.Data.Proxy.Proxy :: + GHC.Internal.Data.Proxy.Proxy "missing")) + o + In an equation for ‘result’: + result + = ((id + . Data.Aeson.Schema.Internal.getKey + (GHC.Internal.Data.Proxy.Proxy :: + GHC.Internal.Data.Proxy.Proxy "missing")) + o) + | +17 | result = [get| o.missing |] + | ^^^^^^^^^^^^^ + diff --git a/test/goldens/ghc/9.4/getqq_missing_key.golden b/test/goldens/ghc/9.4/getqq_missing_key.golden deleted file mode 100644 index c55275f5..00000000 --- a/test/goldens/ghc/9.4/getqq_missing_key.golden +++ /dev/null @@ -1,18 +0,0 @@ -test/wont-compile/GetMissingKey.hs:17:15: error: - • Key 'missing' does not exist in the following schema: - '[ '( 'Data.Aeson.Schema.Key.NormalKey "foo", - 'Data.Aeson.Schema.Type.SchemaScalar Bool)] - • In the second argument of ‘(.)’, namely - ‘Data.Aeson.Schema.Internal.getKey - (Data.Proxy.Proxy :: Data.Proxy.Proxy "missing")’ - In the expression: - (id - . Data.Aeson.Schema.Internal.getKey - (Data.Proxy.Proxy :: Data.Proxy.Proxy "missing")) - o - In an equation for ‘result’: - result - = ((id - . Data.Aeson.Schema.Internal.getKey - (Data.Proxy.Proxy :: Data.Proxy.Proxy "missing")) - o) diff --git a/test/goldens/ghc/9.6/getqq_missing_key.golden b/test/goldens/ghc/9.6/getqq_missing_key.golden deleted file mode 100644 index 7da17e48..00000000 --- a/test/goldens/ghc/9.6/getqq_missing_key.golden +++ /dev/null @@ -1,18 +0,0 @@ -test/wont-compile/GetMissingKey.hs:17:15: error: [GHC-64725] - • Key 'missing' does not exist in the following schema: - '[ '(Data.Aeson.Schema.Key.NormalKey "foo", - Data.Aeson.Schema.Type.SchemaScalar Bool)] - • In the second argument of ‘(.)’, namely - ‘Data.Aeson.Schema.Internal.getKey - (Data.Proxy.Proxy :: Data.Proxy.Proxy "missing")’ - In the expression: - (id - . Data.Aeson.Schema.Internal.getKey - (Data.Proxy.Proxy :: Data.Proxy.Proxy "missing")) - o - In an equation for ‘result’: - result - = ((id - . Data.Aeson.Schema.Internal.getKey - (Data.Proxy.Proxy :: Data.Proxy.Proxy "missing")) - o) diff --git a/test/goldens/ghc/9.8/getqq_missing_key.golden b/test/goldens/ghc/9.8/getqq_missing_key.golden index 7da17e48..51e88d58 100644 --- a/test/goldens/ghc/9.8/getqq_missing_key.golden +++ b/test/goldens/ghc/9.8/getqq_missing_key.golden @@ -1,3 +1,4 @@ + test/wont-compile/GetMissingKey.hs:17:15: error: [GHC-64725] • Key 'missing' does not exist in the following schema: '[ '(Data.Aeson.Schema.Key.NormalKey "foo", @@ -16,3 +17,28 @@ test/wont-compile/GetMissingKey.hs:17:15: error: [GHC-64725] . Data.Aeson.Schema.Internal.getKey (Data.Proxy.Proxy :: Data.Proxy.Proxy "missing")) o) + | +17 | result = [get| o.missing |] + | ^^^^^^^^^^^^^ + +test/wont-compile/GetMissingKey.hs:17:15: error: [GHC-64725] + • Key 'missing' does not exist in the following schema: + '[ '(Data.Aeson.Schema.Key.NormalKey "foo", + Data.Aeson.Schema.Type.SchemaScalar Bool)] + • In the second argument of ‘(.)’, namely + ‘Data.Aeson.Schema.Internal.getKey + (Data.Proxy.Proxy :: Data.Proxy.Proxy "missing")’ + In the expression: + (id + . Data.Aeson.Schema.Internal.getKey + (Data.Proxy.Proxy :: Data.Proxy.Proxy "missing")) + o + In an equation for ‘result’: + result + = ((id + . Data.Aeson.Schema.Internal.getKey + (Data.Proxy.Proxy :: Data.Proxy.Proxy "missing")) + o) + | +17 | result = [get| o.missing |] + | ^^^^^^^^^^^^^ diff --git a/test/goldens/ghc/9.9/getqq_missing_key.golden b/test/goldens/ghc/9.9/getqq_missing_key.golden deleted file mode 100644 index 7da17e48..00000000 --- a/test/goldens/ghc/9.9/getqq_missing_key.golden +++ /dev/null @@ -1,18 +0,0 @@ -test/wont-compile/GetMissingKey.hs:17:15: error: [GHC-64725] - • Key 'missing' does not exist in the following schema: - '[ '(Data.Aeson.Schema.Key.NormalKey "foo", - Data.Aeson.Schema.Type.SchemaScalar Bool)] - • In the second argument of ‘(.)’, namely - ‘Data.Aeson.Schema.Internal.getKey - (Data.Proxy.Proxy :: Data.Proxy.Proxy "missing")’ - In the expression: - (id - . Data.Aeson.Schema.Internal.getKey - (Data.Proxy.Proxy :: Data.Proxy.Proxy "missing")) - o - In an equation for ‘result’: - result - = ((id - . Data.Aeson.Schema.Internal.getKey - (Data.Proxy.Proxy :: Data.Proxy.Proxy "missing")) - o)