diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/src/Thermoprint/Server/Queue.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/src/Thermoprint/Server/Queue.hs b/server/src/Thermoprint/Server/Queue.hs index b752576..dcd4119 100644 --- a/server/src/Thermoprint/Server/Queue.hs +++ b/server/src/Thermoprint/Server/Queue.hs | |||
@@ -109,10 +109,10 @@ instance Ord PlainQueueItem where | |||
109 | (unPlain -> Current _ ) <= _ = True | 109 | (unPlain -> Current _ ) <= _ = True |
110 | 110 | ||
111 | fromZipper :: Queue -> Set QueueItem | 111 | fromZipper :: Queue -> Set QueueItem |
112 | fromZipper Queue{..} = Set.fromList . toList $ mconcat [ Seq.mapWithIndex Pending pending | 112 | fromZipper Queue{..} = foldr Set.insert Set.empty $ mconcat [ Seq.mapWithIndex Pending pending |
113 | , maybe Seq.empty (Seq.singleton . Current) current | 113 | , maybe Seq.empty (Seq.singleton . Current) current |
114 | , Seq.mapWithIndex (\i (a, e) -> History i a e) history | 114 | , Seq.mapWithIndex (\i (a, e) -> History i a e) history |
115 | ] | 115 | ] |
116 | 116 | ||
117 | toZipper :: Set QueueItem -> Queue | 117 | toZipper :: Set QueueItem -> Queue |
118 | toZipper = Set.foldl' (flip insert) def | 118 | toZipper = Set.foldl' (flip insert) def |