packages feed

monoidmap-internal 0.1.0.1 → 0.1.0.2

raw patch · 33 files changed

+78/−115 lines, 33 filesdep +hspec-quickcheck-classesdep ~QuickCheckdep ~basedep ~containersPVP ok

version bump matches the API change (PVP)

Dependencies added: hspec-quickcheck-classes

Dependency ranges changed: QuickCheck, base, containers

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,8 @@+# 0.1.0.2++- Added support for GHC `9.14`.+- Revised version bounds of dependencies.+ # 0.1.0.1  - Revised version bounds of dependencies.
LICENSE view
@@ -186,7 +186,7 @@       same "printed page" as the copyright notice for easier       identification within third-party archives. -   Copyright © 2022–2025 Jonathan Knowles+   Copyright © 2022–2026 Jonathan Knowles     Licensed under the Apache License, Version 2.0 (the "License");    you may not use this file except in compliance with the License.
README.md view
@@ -1,1 +1,10 @@+# `monoidmap-internal`++[![Latest Release](+  https://img.shields.io/hackage/v/monoidmap-internal?label=Latest%20Release&color=227755+)](https://hackage.haskell.org/package/monoidmap-internal)+[![Development Branch](+  https://img.shields.io/badge/Development%20Branch-API%20Documentation-225577+)](https://jonathanknowles.github.io/monoidmap-internal/)+ Internal support for the [`monoidmap`](https://github.com/jonathanknowles/monoidmap) package.
components/monoidmap-benchmark/Main.hs view
@@ -1,5 +1,5 @@ -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- -- Benchmark for the `MonoidMap` type.
components/monoidmap-internal/Data/MonoidMap/Internal.hs view
@@ -6,7 +6,7 @@ {- HLINT ignore "Redundant bracket" -}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- -- Provides /internal/ operations for the 'MonoidMap' type.
components/monoidmap-internal/Data/MonoidMap/Internal/RecoveredMap.hs view
@@ -2,7 +2,7 @@ {-# LANGUAGE GeneralizedNewtypeDeriving #-}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- -- An ordinary left-biased map similar to 'Map', implemented in terms of
components/monoidmap-internal/Data/MonoidMap/Internal/Unsafe.hs view
@@ -1,7 +1,7 @@ {-# OPTIONS_GHC -fno-warn-unused-imports #-}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- -- Provides /unsafe/ operations for the 'MonoidMap' type.
components/monoidmap-test/Data/MonoidMap/Internal/AccessSpec.hs view
@@ -3,7 +3,7 @@ {- HLINT ignore "Use null" -}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.AccessSpec
components/monoidmap-test/Data/MonoidMap/Internal/ClassSpec.hs view
@@ -1,7 +1,7 @@ {-# OPTIONS_GHC -fno-warn-orphans #-}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.ClassSpec@@ -40,8 +40,8 @@     ) import Test.QuickCheck.Classes.Group     ( groupLaws )-import Test.QuickCheck.Classes.Hspec-    ( testLawsMany )+import Test.Hspec.QuickCheck.Classes+    ( testLaws ) import Test.QuickCheck.Classes.Monoid.GCD     ( distributiveGCDMonoidLaws     , gcdMonoidLaws@@ -89,7 +89,7 @@ specLawsFor keyType = do     let description = "Class laws for key type " <> show (typeRep keyType)     describe description $ do-        testLawsMany @(MonoidMap k String)+        testLaws @(MonoidMap k String)             [ eqLaws             , isListLaws             , leftCancellativeLaws@@ -108,7 +108,7 @@             , semigroupMonoidLaws             , showReadLaws             ]-        testLawsMany @(MonoidMap k (Product Integer))+        testLaws @(MonoidMap k (Product Integer))             [ commutativeLaws             , eqLaws             , isListLaws@@ -121,7 +121,7 @@             , semigroupMonoidLaws             , showReadLaws             ]-        testLawsMany @(MonoidMap k (Product Natural))+        testLaws @(MonoidMap k (Product Natural))             [ commutativeLaws             , distributiveGCDMonoidLaws             , distributiveLCMMonoidLaws@@ -148,7 +148,7 @@         -- Here we restrict the generator and shrinker so that they can never         -- produce zero values, to avoid running into cases of ArithException         -- caused by operations that may produce zero demoninators:-        testLawsMany @(MonoidMap k (NonZero (Product Rational)))+        testLaws @(MonoidMap k (NonZero (Product Rational)))             [ commutativeLaws             , eqLaws             , groupLaws@@ -159,7 +159,7 @@             , semigroupMonoidLaws             , showReadLaws             ]-        testLawsMany @(MonoidMap k (Sum Integer))+        testLaws @(MonoidMap k (Sum Integer))             [ cancellativeLaws             , commutativeLaws             , eqLaws@@ -176,7 +176,7 @@             , semigroupMonoidLaws             , showReadLaws             ]-        testLawsMany @(MonoidMap k (Sum Natural))+        testLaws @(MonoidMap k (Sum Natural))             [ cancellativeLaws             , commutativeLaws             , distributiveGCDMonoidLaws@@ -203,7 +203,7 @@             , semigroupMonoidLaws             , showReadLaws             ]-        testLawsMany @(MonoidMap k (Set ()))+        testLaws @(MonoidMap k (Set ()))             [ commutativeLaws             , distributiveGCDMonoidLaws             , distributiveLCMMonoidLaws@@ -227,7 +227,7 @@             , semigroupMonoidLaws             , showReadLaws             ]-        testLawsMany @(MonoidMap k (Set k))+        testLaws @(MonoidMap k (Set k))             [ commutativeLaws             , distributiveGCDMonoidLaws             , distributiveLCMMonoidLaws@@ -251,7 +251,7 @@             , semigroupMonoidLaws             , showReadLaws             ]-        testLawsMany @(MonoidMap k (Set Ordering))+        testLaws @(MonoidMap k (Set Ordering))             [ commutativeLaws             , distributiveGCDMonoidLaws             , distributiveLCMMonoidLaws@@ -275,7 +275,7 @@             , semigroupMonoidLaws             , showReadLaws             ]-        testLawsMany @(MonoidMap k (Set Int))+        testLaws @(MonoidMap k (Set Int))             [ commutativeLaws             , distributiveGCDMonoidLaws             , distributiveLCMMonoidLaws@@ -299,7 +299,7 @@             , semigroupMonoidLaws             , showReadLaws             ]-        testLawsMany @(MonoidMap k (MonoidMap k (Sum Natural)))+        testLaws @(MonoidMap k (MonoidMap k (Sum Natural)))             [ cancellativeLaws             , commutativeLaws             , distributiveGCDMonoidLaws
components/monoidmap-test/Data/MonoidMap/Internal/ComparisonSpec.hs view
@@ -3,7 +3,7 @@ {- HLINT ignore "Use null" -}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.ComparisonSpec
components/monoidmap-test/Data/MonoidMap/Internal/ConversionSpec.hs view
@@ -3,7 +3,7 @@ {- HLINT ignore "Use null" -}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.ConversionSpec
components/monoidmap-test/Data/MonoidMap/Internal/DistributivitySpec.hs view
@@ -4,7 +4,7 @@ {- HLINT ignore "Use null" -}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.DistributivitySpec
components/monoidmap-test/Data/MonoidMap/Internal/ExampleSpec.hs view
@@ -7,7 +7,7 @@ {- HLINT ignore "Use null" -}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.ExampleSpec
components/monoidmap-test/Data/MonoidMap/Internal/FilterSpec.hs view
@@ -3,7 +3,7 @@ {- HLINT ignore "Use null" -}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.FilterSpec
components/monoidmap-test/Data/MonoidMap/Internal/FoldSpec.hs view
@@ -1,5 +1,5 @@ -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.FoldSpec
components/monoidmap-test/Data/MonoidMap/Internal/IntersectionSpec.hs view
@@ -3,7 +3,7 @@ {- HLINT ignore "Use null" -}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.IntersectionSpec
components/monoidmap-test/Data/MonoidMap/Internal/MapSpec.hs view
@@ -3,7 +3,7 @@ {- HLINT ignore "Use null" -}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.MapSpec
components/monoidmap-test/Data/MonoidMap/Internal/MembershipSpec.hs view
@@ -3,7 +3,7 @@ {- HLINT ignore "Use null" -}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.MembershipSpec
components/monoidmap-test/Data/MonoidMap/Internal/PartitionSpec.hs view
@@ -3,7 +3,7 @@ {- HLINT ignore "Use null" -}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.PartitionSpec
components/monoidmap-test/Data/MonoidMap/Internal/PrefixSpec.hs view
@@ -3,7 +3,7 @@ {- HLINT ignore "Use null" -}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.PrefixSpec
components/monoidmap-test/Data/MonoidMap/Internal/RecoveredMapSpec.hs view
@@ -5,7 +5,7 @@ {-# HLINT ignore "Use null" #-}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.RecoveredMapSpec@@ -54,8 +54,8 @@     ) import Test.QuickCheck.Classes     ( eqLaws, functorLaws, monoidLaws, semigroupLaws, semigroupMonoidLaws )-import Test.QuickCheck.Classes.Hspec-    ( testLawsMany )+import Test.Hspec.QuickCheck.Classes+    ( testLaws )  import qualified Data.Map.Strict as OMap import qualified Data.Set as Set@@ -105,13 +105,13 @@     describe description $ do          describe "Class laws" $ do-            testLawsMany @(RMap.Map k v)+            testLaws @(RMap.Map k v)                 [ eqLaws                 , monoidLaws                 , semigroupLaws                 , semigroupMonoidLaws                 ]-            testLawsMany @(RMap.Map k)+            testLaws @(RMap.Map k)                 [ functorLaws                 ] 
components/monoidmap-test/Data/MonoidMap/Internal/SingletonSpec.hs view
@@ -3,7 +3,7 @@ {- HLINT ignore "Use null" -}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.SingletonSpec
components/monoidmap-test/Data/MonoidMap/Internal/SliceSpec.hs view
@@ -3,7 +3,7 @@ {- HLINT ignore "Use null" -}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.SliceSpec
components/monoidmap-test/Data/MonoidMap/Internal/SuffixSpec.hs view
@@ -3,7 +3,7 @@ {- HLINT ignore "Use null" -}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.SuffixSpec
components/monoidmap-test/Data/MonoidMap/Internal/TraversalSpec.hs view
@@ -1,7 +1,8 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE StandaloneDeriving #-} {-# OPTIONS_GHC -Wno-orphans #-} -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.TraversalSpec@@ -187,5 +188,7 @@     ===     fmap MonoidMap.fromMap (Map.mapAccumRWithKey f s (MonoidMap.toMap m)) +#if !MIN_VERSION_QuickCheck(2,17,0) deriving newtype instance Arbitrary a => Arbitrary (First a) deriving newtype instance Arbitrary a => Arbitrary (Last a)+#endif
components/monoidmap-test/Data/MonoidMap/Internal/UnionSpec.hs view
@@ -3,7 +3,7 @@ {- HLINT ignore "Use null" -}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.UnionSpec
components/monoidmap-test/Data/MonoidMap/Internal/ValiditySpec.hs view
@@ -2,7 +2,7 @@ {-# LANGUAGE RankNTypes #-}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Data.MonoidMap.Internal.ValiditySpec
components/monoidmap-test/Test/Combinators/NonZero.hs view
@@ -1,5 +1,5 @@ -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Test.Combinators.NonZero
components/monoidmap-test/Test/Common.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} {-# LANGUAGE ExistentialQuantification #-} {-# OPTIONS_GHC -fno-warn-orphans #-} {- HLINT ignore "Redundant bracket" -}@@ -5,7 +6,7 @@ {- HLINT ignore "Use null" -}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Test.Common@@ -111,15 +112,21 @@   where     function = functionMap MonoidMap.toMap MonoidMap.fromMap +#if !MIN_VERSION_QuickCheck(2,17,0) instance Arbitrary Natural where     arbitrary = arbitrarySizedNatural     shrink = shrinkIntegral+#endif +#if !MIN_VERSION_QuickCheck(2,18,0) instance CoArbitrary Natural where     coarbitrary = coarbitraryIntegral+#endif +#if !MIN_VERSION_QuickCheck(2,18,0) instance Function Natural where     function = functionIntegral+#endif  instance Arbitrary Text where     arbitrary = Text.pack <$> listOf genChar
components/monoidmap-test/Test/Hspec/Unit.hs view
@@ -1,7 +1,7 @@ {-# LANGUAGE FunctionalDependencies #-}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- module Test.Hspec.Unit where
components/monoidmap-test/Test/Key.hs view
@@ -3,7 +3,7 @@ {-# LANGUAGE DeriveGeneric #-}  -- |--- Copyright: © 2022–2025 Jonathan Knowles+-- Copyright: © 2022–2026 Jonathan Knowles -- License: Apache-2.0 -- -- Quasi-unique keys.
− components/monoidmap-test/Test/QuickCheck/Classes/Hspec.hs
@@ -1,63 +0,0 @@-{-# LANGUAGE PolyKinds #-}---- |--- Copyright: © 2022–2025 Jonathan Knowles--- License: Apache-2.0------ Provides testing functions to check that type class instances obey laws.----module Test.QuickCheck.Classes.Hspec-    ( testLaws-    , testLawsMany-    ) where--import Prelude--import Control.Monad-    ( forM_ )-import Data.Proxy-    ( Proxy (..) )-import Data.Typeable-    ( Typeable, typeRep )-import Test.Hspec-    ( Spec, describe, it, parallel )-import Test.QuickCheck.Classes-    ( Laws (..) )---- | Constructs a test to check that the given type class instance obeys the---   given set of laws.------ Example usage:------ >>> testLaws @Natural ordLaws--- >>> testLaws @(Map Int) functorLaws----testLaws-    :: forall a. Typeable a-    => (Proxy a -> Laws)-    -> Spec-testLaws getLaws =-    parallel $ describe description $-        forM_ (lawsProperties laws) $ uncurry it-  where-    description = mconcat-        [ "Testing "-        , lawsTypeclass laws-        , " laws for type "-        , show (typeRep $ Proxy @a)-        ]-    laws = getLaws $ Proxy @a---- | Calls `testLaws` with multiple sets of laws.------ Example usage:------ >>> testLawsMany @Natural [eqLaws, ordLaws]--- >>> testLawsMany @(Map Int) [foldableLaws, functorLaws]----testLawsMany-    :: forall a. Typeable a-    => [Proxy a -> Laws]-    -> Spec-testLawsMany getLawsMany =-    testLaws @a `mapM_` getLawsMany
monoidmap-internal.cabal view
@@ -1,12 +1,12 @@ cabal-version:  3.0 name:           monoidmap-internal-version:        0.1.0.1+version:        0.1.0.2 bug-reports:    https://github.com/jonathanknowles/monoidmap-internal/issues license:        Apache-2.0 license-file:   LICENSE author:         Jonathan Knowles maintainer:     mail@jonathanknowles.net-copyright:      2022–2025 Jonathan Knowles+copyright:      2022–2026 Jonathan Knowles category:       Data Structures synopsis:       Internal support for monoidmap. description:    Internal support for the monoidmap package.@@ -16,15 +16,17 @@     README.md  common dependency-base-    build-depends:base                          >= 4.14.3.0   && < 4.22+    build-depends:base                          >= 4.14.3.0   && < 4.23 common dependency-containers-    build-depends:containers                    >= 0.6.5.1    && < 0.8+    build-depends:containers                    >= 0.6.5.1    && < 0.9 common dependency-deepseq     build-depends:deepseq                       >= 1.4.4.0    && < 1.6 common dependency-groups     build-depends:groups                        >= 0.5.3      && < 0.6 common dependency-hspec     build-depends:hspec                         >= 2.10.9     && < 2.12+common dependency-hspec-quickcheck-classes+    build-depends:hspec-quickcheck-classes      >= 0.0.0.0    && < 0.1 common dependency-monoid-subclasses     build-depends:monoid-subclasses             >= 1.2.3      && < 1.3 common dependency-nothunks@@ -32,7 +34,7 @@ common dependency-pretty-show     build-depends:pretty-show                   >= 1.10       && < 1.11 common dependency-QuickCheck-    build-depends:QuickCheck                    >= 2.14.2     && < 2.17+    build-depends:QuickCheck                    >= 2.14.2     && < 2.19 common dependency-quickcheck-classes     build-depends:quickcheck-classes            >= 0.6.5.0    && < 0.7 common dependency-quickcheck-groups@@ -115,6 +117,7 @@       , dependency-containers       , dependency-groups       , dependency-hspec+      , dependency-hspec-quickcheck-classes       , dependency-monoid-subclasses       , dependency-pretty-show       , dependency-QuickCheck@@ -158,7 +161,6 @@         Test.Common         Test.Hspec.Unit         Test.Key-        Test.QuickCheck.Classes.Hspec     type:         exitcode-stdio-1.0     default-language: