From 7a4b181bf39c3e33f0d9a78390fc6237cee783f8 Mon Sep 17 00:00:00 2001 From: joe Date: Thu, 27 Jul 2017 08:23:10 -0400 Subject: Bug-fix: Enabled storing multiple peers in a swarm. --- src/Data/Wrapper/PSQ.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Data/Wrapper') diff --git a/src/Data/Wrapper/PSQ.hs b/src/Data/Wrapper/PSQ.hs index 87648e84..58a6f624 100644 --- a/src/Data/Wrapper/PSQ.hs +++ b/src/Data/Wrapper/PSQ.hs @@ -62,7 +62,7 @@ insertWith :: (PSQKey k, Ord p) => (p -> p -> p) -> k -> p -> PSQ k p -> PSQ k p insertWith f k p0 q = snd $ Q.alter f' k q where f' (Just (p,())) = ((),Just (f p0 p, ())) - f' Nothing = ((),Nothing) + f' Nothing = ((),Just (p0,())) {-# INLINE insertWith #-} singleton :: (PSQKey k, Ord p) => k -> p -> PSQ k p -- cgit v1.2.3