packages feed

core-data 0.3.6.0 → 0.3.8.0

raw patch · 2 files changed

+33/−12 lines, 2 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Core.Data.Structures: type family E α :: Type;
+ Core.Data.Structures: instance Core.Data.Structures.Key GHC.Conc.Sync.ThreadId
+ Core.Data.Structures: removeElement :: Key ε => ε -> Set ε -> Set ε
+ Core.Data.Structures: removeKeyValue :: Key κ => κ -> Map κ ν -> Map κ ν
+ Core.Data.Structures: type E α :: Type;
+ Core.Data.Structures: type K α :: Type;
+ Core.Data.Structures: type V α :: Type;

Files

core-data.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4.+-- This file has been generated from package.yaml by hpack version 0.35.0. -- -- see: https://github.com/sol/hpack  name:           core-data-version:        0.3.6.0+version:        0.3.8.0 synopsis:       Convenience wrappers around common data structures and encodings description:    Wrappers around common data structures and encodings.                 .@@ -26,7 +26,7 @@ license-file:   LICENSE build-type:     Simple tested-with:-    GHC == 8.10.7, GHC == 9.2.2+    GHC == 8.10.7, GHC == 9.2.4  source-repository head   type: git
lib/Core/Data/Structures.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE GeneralisedNewtypeDeriving #-}+{-# LANGUAGE ImportQualifiedPost #-} {-# LANGUAGE TypeFamilies #-} {-# OPTIONS_GHC -fno-warn-orphans -Wno-redundant-constraints #-} @@ -16,6 +17,7 @@     insertKeyValue,     containsKey,     lookupKeyValue,+    removeKeyValue,      -- * Conversions     Dictionary (K, V, fromMap, intoMap),@@ -26,6 +28,7 @@     singletonSet,     insertElement,     containsElement,+    removeElement,      -- * Conversions     Collection (E, fromSet, intoSet),@@ -36,19 +39,20 @@     unSet, ) where +import Control.Concurrent qualified as Base (ThreadId) import Core.Text.Bytes (Bytes) import Core.Text.Rope (Rope) import Data.Bifoldable (Bifoldable)-import qualified Data.ByteString as B (ByteString)-import qualified Data.HashMap.Strict as HashMap-import qualified Data.HashSet as HashSet+import Data.ByteString qualified as B (ByteString)+import Data.HashMap.Strict qualified as HashMap+import Data.HashSet qualified as HashSet import Data.Hashable (Hashable) import Data.Kind (Type)-import qualified Data.Map.Strict as OrdMap-import qualified Data.Set as OrdSet-import qualified Data.Text as T (Text)-import qualified Data.Text.Lazy as U (Text)-import qualified GHC.Exts as Exts (IsList (..))+import Data.Map.Strict qualified as OrdMap+import Data.Set qualified as OrdSet+import Data.Text qualified as T (Text)+import Data.Text.Lazy qualified as U (Text)+import GHC.Exts qualified as Exts (IsList (..))  -- Naming convention used throughout this file is (Thing u) where u is the -- underlying structure [from unordered-containers] wrapped in the Thing@@ -108,6 +112,8 @@  instance Key B.ByteString +instance Key Base.ThreadId+ instance Foldable (Map κ) where     foldr f start (Map u) = HashMap.foldr f start u     null (Map u) = HashMap.null u@@ -146,7 +152,14 @@ containsKey :: Key κ => κ -> Map κ ν -> Bool containsKey k (Map u) = HashMap.member k u --- |+{- |+Remove a key/value pair if present in the dictionary.++@since 0.3.7+-}+removeKeyValue :: Key κ => κ -> Map κ ν -> Map κ ν+removeKeyValue k (Map u) = Map (HashMap.delete k u)+ instance Key κ => Semigroup (Map κ ν) where     (<>) (Map u1) (Map u2) = Map (HashMap.union u1 u2) @@ -288,6 +301,14 @@ -} containsElement :: Key ε => ε -> Set ε -> Bool containsElement e (Set u) = HashSet.member e u++{- |+Remove an element from the collection if present.++@since 0.3.7+-}+removeElement :: Key ε => ε -> Set ε -> Set ε+removeElement e (Set u) = Set (HashSet.delete e u)  {- | Types that represent collections of elements that can be converted to