diff options
Diffstat (limited to 'server/src/Thermoprint/Server/Printer.hs')
| -rw-r--r-- | server/src/Thermoprint/Server/Printer.hs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/server/src/Thermoprint/Server/Printer.hs b/server/src/Thermoprint/Server/Printer.hs new file mode 100644 index 0000000..e66afff --- /dev/null +++ b/server/src/Thermoprint/Server/Printer.hs | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | {-# LANGUAGE RankNTypes #-} | ||
| 2 | |||
| 3 | module Thermoprint.Server.Printer | ||
| 4 | ( Printer | ||
| 5 | ) where | ||
| 6 | |||
| 7 | import Thermoprint.API (PrintingError(..), Printout) | ||
| 8 | |||
| 9 | import Thermoprint.Server.Database | ||
| 10 | |||
| 11 | import Database.Persist | ||
| 12 | import Database.Persist.Sql | ||
| 13 | |||
| 14 | import Data.Sequence (Seq, ViewL(..)) | ||
| 15 | import qualified Data.Sequence as Seq | ||
| 16 | import Data.Map (Map) | ||
| 17 | import qualified Data.Map as Map | ||
| 18 | |||
| 19 | import Control.Monad.IO.Class (MonadIO) | ||
| 20 | |||
| 21 | import Control.Concurrent.STM | ||
| 22 | |||
| 23 | data Printer = Printer | ||
| 24 | { print :: forall m. (MonadIO m) => Printout -> m (Maybe PrintingError) | ||
| 25 | , queue :: TVar (Seq JobId) | ||
| 26 | } | ||
| 27 | |||
| 28 | runPrinter :: Printer -> IO () | ||
| 29 | runPrinter = undefined | ||
