diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/src/Thermoprint/Server/Queue.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/server/src/Thermoprint/Server/Queue.hs b/server/src/Thermoprint/Server/Queue.hs index 832b876..d5ab42b 100644 --- a/server/src/Thermoprint/Server/Queue.hs +++ b/server/src/Thermoprint/Server/Queue.hs | |||
@@ -1,4 +1,4 @@ | |||
1 | {-# LANGUAGE FlexibleInstances, FlexibleContexts #-} | 1 | {-# LANGUAGE FlexibleInstances, FlexibleContexts, MultiParamTypeClasses #-} |
2 | {-# LANGUAGE ViewPatterns #-} | 2 | {-# LANGUAGE ViewPatterns #-} |
3 | {-# LANGUAGE RecordWildCards #-} | 3 | {-# LANGUAGE RecordWildCards #-} |
4 | {-# LANGUAGE DeriveGeneric, DeriveAnyClass #-} | 4 | {-# LANGUAGE DeriveGeneric, DeriveAnyClass #-} |
@@ -125,6 +125,9 @@ toZipper = Set.foldr' insert def | |||
125 | type QueueManager t = QueueManagerM t (Extended Micro) | 125 | type QueueManager t = QueueManagerM t (Extended Micro) |
126 | type QueueManagerM t = ComposeT (StateT Queue) t STM | 126 | type QueueManagerM t = ComposeT (StateT Queue) t STM |
127 | 127 | ||
128 | instance (Monad (StateT s (g m)), Monad (g m)) => MonadState s (ComposeT (StateT s) g m) where | ||
129 | state = ComposeT . state | ||
130 | |||
128 | runQM :: ( HasQueue q | 131 | runQM :: ( HasQueue q |
129 | , MFunctor t | 132 | , MFunctor t |
130 | , MonadTrans t | 133 | , MonadTrans t |