blob: e66afffc451f9574d771f07326fe14e6a131fa18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
{-# LANGUAGE RankNTypes #-}
module Thermoprint.Server.Printer
( Printer
) where
import Thermoprint.API (PrintingError(..), Printout)
import Thermoprint.Server.Database
import Database.Persist
import Database.Persist.Sql
import Data.Sequence (Seq, ViewL(..))
import qualified Data.Sequence as Seq
import Data.Map (Map)
import qualified Data.Map as Map
import Control.Monad.IO.Class (MonadIO)
import Control.Concurrent.STM
data Printer = Printer
{ print :: forall m. (MonadIO m) => Printout -> m (Maybe PrintingError)
, queue :: TVar (Seq JobId)
}
runPrinter :: Printer -> IO ()
runPrinter = undefined
|