mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-20 17:28:46 +03:00
Drop deprecated TextMap.filter from daml-stdlib (#2761)
It has been deprecated for a while now with a hint to use `filterWithKey` instead. We should add ```haskell filter : (v -> Bool) -> TextMap v -> TextMap v ``` after the next SDK release instead. This is tracked in #2760.
This commit is contained in:
parent
5e962a2b61
commit
b7bcba4ca7
@ -15,7 +15,6 @@ module DA.TextMap
|
||||
, null
|
||||
, lookup
|
||||
, member
|
||||
, filter
|
||||
, filterWithKey
|
||||
, delete
|
||||
, insert
|
||||
@ -74,11 +73,6 @@ lookup = primitive @"BEMapLookup"
|
||||
member : Text -> TextMap v -> Bool
|
||||
member x m = isSome $ lookup x m
|
||||
|
||||
{-# DEPRECATED filter "Use 'filterWithKey' instead of 'filter'" #-}
|
||||
-- | DEPRECATED: Use `filterWithKey` instead.
|
||||
filter : (Text -> v -> Bool) -> TextMap v -> TextMap v
|
||||
filter = filterWithKey
|
||||
|
||||
-- | Filter all values that satisfy some predicate.
|
||||
filterWithKey : (Text -> v -> Bool) -> TextMap v -> TextMap v
|
||||
filterWithKey p m = fromList $ List.filter (uncurry p) (toList m)
|
||||
|
Loading…
Reference in New Issue
Block a user