gltf-codec 0.1.0.3 → 0.1.0.4
raw patch · 4 files changed
+50/−18 lines, 4 filesdep ~aesondep ~bytestringdep ~textPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: aeson, bytestring, text, vector
API changes (from Hackage documentation)
- Codec.GlTF.Prelude: (.:) :: FromJSON a => Object -> Text -> Parser a
+ Codec.GlTF.Prelude: (.:) :: FromJSON a => Object -> Key -> Parser a
- Codec.GlTF.Prelude: (.:?) :: FromJSON a => Object -> Text -> Parser (Maybe a)
+ Codec.GlTF.Prelude: (.:?) :: FromJSON a => Object -> Key -> Parser (Maybe a)
- Codec.GlTF.Prelude: type Object = HashMap Text Value
+ Codec.GlTF.Prelude: type Object = KeyMap Value
Files
- ChangeLog.md +5/−0
- README.md +0/−1
- gltf-codec.cabal +36/−15
- src/Codec/GlTF/TextureInfo.hs +9/−2
ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for `gltf-codec` +## [0.1.0.4] - 2022-03-23++* Compatibility with GHC 9.2, aeson-2, text-2.+ ## [0.1.0.3] - 2021-01-22 * Fixed `TextureInfo` parsing.@@ -16,6 +20,7 @@ * Initial import. +[0.1.0.4]: https://gitlab.com/dpwiz/gltf/tree/v0.1.0.4 [0.1.0.3]: https://gitlab.com/dpwiz/gltf/tree/v0.1.0.3 [0.1.0.2]: https://gitlab.com/dpwiz/gltf/tree/v0.1.0.2 [0.1.0.1]: https://gitlab.com/dpwiz/gltf/tree/v0.1.0.1
− README.md
@@ -1,1 +0,0 @@-# gltf
gltf-codec.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.33.0.+-- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack ----- hash: eecdd6a65cd0a403f8820c58fe68df53c4088222beb71ada1d5712fc482109fe+-- hash: f285214438633051908f00e53d843d097f8cd37820d8e0d93d39e07409b9e2e1 name: gltf-codec-version: 0.1.0.3+version: 0.1.0.4 synopsis: glTF scene loader description: The package provides basic types to process JSON and "binary" files. No further conversion is performed to keep dependencies to a minimum.@@ -19,7 +19,6 @@ license-file: LICENSE build-type: Simple extra-source-files:- README.md ChangeLog.md source-repository head@@ -53,17 +52,28 @@ Paths_gltf_codec hs-source-dirs: src- default-extensions: ApplicativeDo BlockArguments DeriveGeneric DuplicateRecordFields FlexibleContexts GeneralizedNewtypeDeriving LambdaCase OverloadedStrings PatternSynonyms RecordWildCards StrictData+ default-extensions:+ ApplicativeDo+ BlockArguments+ DeriveGeneric+ DuplicateRecordFields+ FlexibleContexts+ GeneralizedNewtypeDeriving+ LambdaCase+ OverloadedStrings+ PatternSynonyms+ RecordWildCards+ StrictData build-depends:- aeson >=1.4 && <1.6+ aeson >=1.4 && <2.1 , base >=4.7 && <5- , base64-bytestring >=1 && <2+ , base64-bytestring ==1.* , binary >=0.8.7 && <1- , bytestring >=0.10 && <0.11+ , bytestring >=0.10 && <0.12 , scientific >=0.3.6 && <0.4- , text >=1.2 && <1.3+ , text >=1.2 && <2.1 , unordered-containers >=0.2.10 && <0.3- , vector >=0.12 && <0.13+ , vector ==0.12.* default-language: Haskell2010 test-suite gltf-codec-test@@ -73,13 +83,24 @@ Paths_gltf_codec hs-source-dirs: test- default-extensions: ApplicativeDo BlockArguments DeriveGeneric DuplicateRecordFields FlexibleContexts GeneralizedNewtypeDeriving LambdaCase OverloadedStrings PatternSynonyms RecordWildCards StrictData+ default-extensions:+ ApplicativeDo+ BlockArguments+ DeriveGeneric+ DuplicateRecordFields+ FlexibleContexts+ GeneralizedNewtypeDeriving+ LambdaCase+ OverloadedStrings+ PatternSynonyms+ RecordWildCards+ StrictData ghc-options: -threaded -rtsopts -with-rtsopts=-N build-depends: base >=4.7 && <5- , bytestring >=0.10 && <0.11- , directory >=1.3 && <1.4- , filepath >=1.4 && <1.5+ , bytestring >=0.10 && <0.12+ , directory ==1.3.*+ , filepath ==1.4.* , gltf-codec- , shower >=0.2 && <0.3+ , shower ==0.2.* default-language: Haskell2010
src/Codec/GlTF/TextureInfo.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE CPP #-}+ module Codec.GlTF.TextureInfo ( TextureInfo(..) , TextureInfo_@@ -8,8 +10,13 @@ import Data.Foldable (toList) import Data.Aeson-import qualified Data.HashMap.Strict as HashMap +#if MIN_VERSION_aeson(2,0,0)+import qualified Data.Aeson.KeyMap as KeyMap+#else+import qualified Data.HashMap.Strict as KeyMap+#endif+ -- | Reference to a texture. data TextureInfo a = TextureInfo { index :: Int@@ -44,7 +51,7 @@ Null -> [] Object sub ->- HashMap.toList sub+ KeyMap.toList sub _ -> error "assert: subtype of TextureInfo encodes to Object" , [ "extensions" .= extensions' | extensions' <- toList extensions ]