on master help sign in
Allow compilation with aeson 2.2.0.0.

This version of aeson removes Data.Aeson.Internal, but exports the things yaml needed from it in Data.Aeson.Types. CPP has been used to make it work with both 2.2 and earlier versions. However, I was only able to test with aeson 2.1; attempts to constrain the build to earlier versions did not produce a viable build path. Closes #219.

commit3ec4100305621e393b4a4c34808caa3863ad4857 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 29 Jun 2023, 16:10 (3 years ago) parent5a039de
2 files changed+6−2
yaml/src/Data/Yaml/Internal.hs+5−1 yaml/test/Data/Yaml/IncludeSpec.hs+1−1
yaml/src/Data/Yaml/Internal.hs+5−1
@@ -46,8 +46,12 @@ import Data.Aeson.KeyMap (KeyMap)
4646#else
4747import qualified Data.HashMap.Strict as M
4848#endif
49−import Data.Aeson.Internal (JSONPath, JSONPathElement(..), formatError)
49+#if MIN_VERSION_aeson(2,2,0)
50+import Data.Aeson.Types hiding (AesonException, parse)
51+#else
5052import Data.Aeson.Types hiding (parse)
53+import Data.Aeson.Internal (formatError)
54+#endif
5155import qualified Data.Attoparsec.Text as Atto
5256import Data.Bits (shiftL, (.|.))
5357import Data.ByteString (ByteString)
yaml/test/Data/Yaml/IncludeSpec.hs+1−1
@@ -6,7 +6,7 @@ import Test.Hspec
66import Data.List (isPrefixOf)
77import qualified Data.ByteString.Lazy as LB
88import Data.Aeson
9−import Data.Aeson.Internal (JSONPathElement(..))
9+import Data.Aeson.Types (JSONPathElement(..))
1010import Data.Yaml (ParseException(InvalidYaml))
1111import Data.Yaml.Include
1212import Data.Yaml.Internal