diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-02-05 17:50:58 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-02-05 17:50:58 +0100 |
commit | 8ed465db831a534958c05c2670f618fbcef7af38 (patch) | |
tree | 3b4bd5d5f8d08aabcbb40f8e9242d00b26f76608 /server/src | |
parent | 96d4e2f86bd4a568d0cb68b9b716c8a53113f34c (diff) | |
download | thermoprint-8ed465db831a534958c05c2670f618fbcef7af38.tar thermoprint-8ed465db831a534958c05c2670f618fbcef7af38.tar.gz thermoprint-8ed465db831a534958c05c2670f618fbcef7af38.tar.bz2 thermoprint-8ed465db831a534958c05c2670f618fbcef7af38.tar.xz thermoprint-8ed465db831a534958c05c2670f618fbcef7af38.zip |
better docs
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 |