Skip to content

Commit

Permalink
Merge branch 'pr/34'
Browse files Browse the repository at this point in the history
* pr/34:
  Update the deps

# Conflicts:
#	stm-containers.cabal
  • Loading branch information
nikita-volkov committed May 8, 2024
2 parents ab8ebbc + cf8ccae commit 4bb0537
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
11 changes: 9 additions & 2 deletions library/StmContainers/Map.hs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ module StmContainers.Map
reset,
unfoldlM,
listT,
listTNonAtomic,
)
where

Expand Down Expand Up @@ -111,5 +112,11 @@ unfoldlM (Map hamt) =
-- Stream the associations passively.
{-# INLINE listT #-}
listT :: Map key value -> ListT STM (key, value)
listT (Map hamt) =
fmap (\(Product2 k v) -> (k, v)) (A.listT hamt)
listT (Map hamt) = fmap (\(Product2 k v) -> (k, v)) (A.listT hamt)

-- |
-- Stream the associations passively.
-- Data may be inconsistent/out of date.
{-# INLINE listTNonAtomic #-}
listTNonAtomic :: Map key value -> ListT IO (key, value)
listTNonAtomic (Map hamt) = fmap (\(Product2 k v) -> (k, v)) (A.listTNonAtomic hamt)
2 changes: 1 addition & 1 deletion stm-containers.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ library
focus >=1.0.1.4 && <1.1,
hashable >=1.4 && <2,
list-t >=1.0.1 && <1.1,
stm-hamt >=1.2 && <1.3,
stm-hamt >=1.2.1 && <1.3,
transformers >=0.5 && <0.7,

test-suite test
Expand Down

0 comments on commit 4bb0537

Please sign in to comment.