aboutsummaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2016-02-11 22:05:23 +0000
committerGregor Kleen <gkleen@yggdrasil.li>2016-02-11 22:05:23 +0000
commit501441e2e5c96c85dec68dc42992d91db055f092 (patch)
treee9a93d61d95ec874a526cbc3b03f9b4f8e4d8ba1 /server/src
parent7de330ea4fa17a0e1ba2eb33e4440545dc6be93a (diff)
downloadthermoprint-501441e2e5c96c85dec68dc42992d91db055f092.tar
thermoprint-501441e2e5c96c85dec68dc42992d91db055f092.tar.gz
thermoprint-501441e2e5c96c85dec68dc42992d91db055f092.tar.bz2
thermoprint-501441e2e5c96c85dec68dc42992d91db055f092.tar.xz
thermoprint-501441e2e5c96c85dec68dc42992d91db055f092.zip
Fixed zipper morphisms flipping history
Diffstat (limited to 'server/src')
-rw-r--r--server/src/Thermoprint/Server/Queue.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/Thermoprint/Server/Queue.hs b/server/src/Thermoprint/Server/Queue.hs
index 52e973d..b752576 100644
--- a/server/src/Thermoprint/Server/Queue.hs
+++ b/server/src/Thermoprint/Server/Queue.hs
@@ -115,7 +115,7 @@ fromZipper Queue{..} = Set.fromList . toList $ mconcat [ Seq.mapWithIndex Pendin
115 ] 115 ]
116 116
117toZipper :: Set QueueItem -> Queue 117toZipper :: Set QueueItem -> Queue
118toZipper = Set.foldr' insert def 118toZipper = Set.foldl' (flip insert) def
119 where 119 where
120 insert (Pending _ a) q@(Queue{..}) = q { pending = pending |> a } 120 insert (Pending _ a) q@(Queue{..}) = q { pending = pending |> a }
121 insert (Current a) q = q { current = Just a } 121 insert (Current a) q = q { current = Just a }