store 0.7.20 → 0.7.21
raw patch · 3 files changed
+24/−4 lines, 3 files
Files
- ChangeLog.md +12/−0
- store.cabal +2/−2
- test/Data/StoreSpec.hs +10/−2
ChangeLog.md view
@@ -1,5 +1,17 @@ # ChangeLog +## Unreleased++* Fix test compilation on GHC 9.10+, where `template-haskell` types+ (`Type`, `TySynEqn`, `PkgName`, etc.) live in `GHC.Internal.TH.Syntax`+ rather than `Language.Haskell.TH.Syntax`. The `isThName` filter that+ skips TH AST types from the auto-generated `Store` roundtrip enumeration+ was matching only the old module name and silently let the TH types+ through, causing `No instance for 'Serial IO Type'` style errors.+ See [#182][].++[#182]: https://github.com/mgsloan/store/issues/182+ ## 0.7.20 * Fixes build of test with `vector-0.13.2.0`. See [#181][].
store.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.37.0.+-- This file has been generated from package.yaml by hpack version 0.39.1. -- -- see: https://github.com/sol/hpack name: store-version: 0.7.20+version: 0.7.21 synopsis: Fast binary serialization category: Serialization, Data homepage: https://github.com/mgsloan/store#readme
test/Data/StoreSpec.hs view
@@ -391,8 +391,16 @@ omitTys <- (omitTys0 ++) <$> mapM (\ty -> [t| PV.Vector $(pure ty) |]) omitTys0 let f ty = isMonoType ty && ty `notElem` omitTys && null (listify isThName ty) filtered = filter f insts- -- Roundtrip testing of TH instances is disabled - see issue #150- isThName n = nameModule n == Just "Language.Haskell.TH.Syntax"+ -- Roundtrip testing of TH instances is disabled - see issue #150.+ -- GHC 9.10+ ships template-haskell inside `ghc-internal`, so+ -- `nameModule` returns `GHC.Internal.TH.Syntax` for TH AST+ -- types (Type, TySynEqn, PkgName, SourceUnpackedness, ...).+ -- Match both module names so the filter keeps working on both+ -- old and new GHCs. See issue #182.+ isThName n = nameModule n `elem`+ [ Just "Language.Haskell.TH.Syntax"+ , Just "GHC.Internal.TH.Syntax"+ ] smallcheckManyStore verbose 2 $ map return filtered) it "Store on non-numeric Float/Double values" $ do let testNonNumeric :: forall a m. (RealFloat a, Eq a, Show a, Typeable a, Store a, Monad m, MonadFail m) => Proxy a -> m ()