From e8e0cb7f36641ffb7901178bc54fef98eba9215c Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Thu, 12 Apr 2018 14:34:05 +0200 Subject: Fix build --- server/src/Thermoprint/Server/Printer/Generic.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server/src/Thermoprint/Server/Printer') 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) genericPrint :: FilePath -> PrinterMethod genericPrint path = PM $ genericPrint' path -genericPrint' :: (MonadIO m, MonadMask m, MonadLogger m) => FilePath -> Printout -> m (Maybe PrintingError) +genericPrint' :: (MonadIO m, MonadMask m, MonadLogger m, MonadUnliftIO m) => FilePath -> Printout -> m (Maybe PrintingError) genericPrint' path = flip catches handlers . withFile path . print where - withFile path f = flip withEx f $ mkAcquire (openFile path WriteMode >>= (\h -> h <$ hSetBuffering h NoBuffering)) hClose + withFile path f = flip with f $ mkAcquire (openFile path WriteMode >>= (\h -> h <$ hSetBuffering h NoBuffering)) hClose handlers = [ Handler $ return . Just . IOError . (show :: IOException -> String) , Handler $ return . Just . EncError , Handler $ return . Just -- cgit v1.2.3