diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-12 14:34:05 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2018-04-12 15:12:11 +0200 |
commit | e8e0cb7f36641ffb7901178bc54fef98eba9215c (patch) | |
tree | 2c51a3d2f98232fae2cdedb8b96368802b125411 /server/src/Thermoprint/Server/Printer | |
parent | 2ab4ee48a15da128536b27c77a224c08cd2e9b78 (diff) | |
download | thermoprint-e8e0cb7f36641ffb7901178bc54fef98eba9215c.tar thermoprint-e8e0cb7f36641ffb7901178bc54fef98eba9215c.tar.gz thermoprint-e8e0cb7f36641ffb7901178bc54fef98eba9215c.tar.bz2 thermoprint-e8e0cb7f36641ffb7901178bc54fef98eba9215c.tar.xz thermoprint-e8e0cb7f36641ffb7901178bc54fef98eba9215c.zip |
Fix build
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 |