diff options
Diffstat (limited to 'server/src/Thermoprint/Server/Printer')
-rw-r--r-- | server/src/Thermoprint/Server/Printer/Generic.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/src/Thermoprint/Server/Printer/Generic.hs b/server/src/Thermoprint/Server/Printer/Generic.hs index ce818ee..441c74d 100644 --- a/server/src/Thermoprint/Server/Printer/Generic.hs +++ b/server/src/Thermoprint/Server/Printer/Generic.hs | |||
@@ -63,10 +63,10 @@ import Prelude hiding (mapM_, sequence_, lines) | |||
63 | genericPrint :: FilePath -> PrinterMethod | 63 | genericPrint :: FilePath -> PrinterMethod |
64 | genericPrint path = PM $ genericPrint' path | 64 | genericPrint path = PM $ genericPrint' path |
65 | 65 | ||
66 | genericPrint' :: (MonadIO m, MonadMask m, MonadLogger m) => FilePath -> Printout -> m (Maybe PrintingError) | 66 | genericPrint' :: (MonadIO m, MonadMask m, MonadLogger m, MonadUnliftIO m) => FilePath -> Printout -> m (Maybe PrintingError) |
67 | genericPrint' path = flip catches handlers . withFile path . print | 67 | genericPrint' path = flip catches handlers . withFile path . print |
68 | where | 68 | where |
69 | withFile path f = flip withEx f $ mkAcquire (openFile path WriteMode >>= (\h -> h <$ hSetBuffering h NoBuffering)) hClose | 69 | withFile path f = flip with f $ mkAcquire (openFile path WriteMode >>= (\h -> h <$ hSetBuffering h NoBuffering)) hClose |
70 | handlers = [ Handler $ return . Just . IOError . (show :: IOException -> String) | 70 | handlers = [ Handler $ return . Just . IOError . (show :: IOException -> String) |
71 | , Handler $ return . Just . EncError | 71 | , Handler $ return . Just . EncError |
72 | , Handler $ return . Just | 72 | , Handler $ return . Just |