diff options
Diffstat (limited to 'server/src')
-rw-r--r-- | server/src/Thermoprint/Server/Queue.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/server/src/Thermoprint/Server/Queue.hs b/server/src/Thermoprint/Server/Queue.hs index 69295bb..3c7cce6 100644 --- a/server/src/Thermoprint/Server/Queue.hs +++ b/server/src/Thermoprint/Server/Queue.hs | |||
@@ -140,6 +140,8 @@ runQM qm (extractQueue -> q) = sleep =<< qm' | |||
140 | 140 | ||
141 | intersection :: (Foldable f, MonadState Queue (QueueManagerM t)) => f (QueueManager t) -> QueueManager t | 141 | intersection :: (Foldable f, MonadState Queue (QueueManagerM t)) => f (QueueManager t) -> QueueManager t |
142 | -- ^ Combine two 'QueueManager's keeping only 'QueueEntry's both managers decide to keep | 142 | -- ^ Combine two 'QueueManager's keeping only 'QueueEntry's both managers decide to keep |
143 | -- | ||
144 | -- Side effects propagate left to right | ||
143 | intersection = foldr' (qmCombine Set.intersection) idQM | 145 | intersection = foldr' (qmCombine Set.intersection) idQM |
144 | 146 | ||
145 | idQM :: Monad (QueueManagerM t) => QueueManager t | 147 | idQM :: Monad (QueueManagerM t) => QueueManager t |
@@ -148,6 +150,8 @@ idQM = return PosInf | |||
148 | 150 | ||
149 | union :: (Foldable f, MonadState Queue (QueueManagerM t)) => f (QueueManager t) -> QueueManager t | 151 | union :: (Foldable f, MonadState Queue (QueueManagerM t)) => f (QueueManager t) -> QueueManager t |
150 | -- ^ Combine two 'QueueManager's keeping all 'QueueEntry's either of the managers decides to keep | 152 | -- ^ Combine two 'QueueManager's keeping all 'QueueEntry's either of the managers decides to keep |
153 | -- | ||
154 | -- Side effects propagate left to right | ||
151 | union = foldr' (qmCombine Set.union) nullQM | 155 | union = foldr' (qmCombine Set.union) nullQM |
152 | 156 | ||
153 | nullQM :: MonadState Queue (QueueManagerM t) => QueueManager t | 157 | nullQM :: MonadState Queue (QueueManagerM t) => QueueManager t |