diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-02-11 22:05:23 +0000 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-02-11 22:05:23 +0000 |
commit | 501441e2e5c96c85dec68dc42992d91db055f092 (patch) | |
tree | e9a93d61d95ec874a526cbc3b03f9b4f8e4d8ba1 /server/src | |
parent | 7de330ea4fa17a0e1ba2eb33e4440545dc6be93a (diff) | |
download | thermoprint-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.hs | 2 |
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 | ||
117 | toZipper :: Set QueueItem -> Queue | 117 | toZipper :: Set QueueItem -> Queue |
118 | toZipper = Set.foldr' insert def | 118 | toZipper = 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 } |