From 9d9bad89241bfa14255361dd8452ad40291a9684 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 25 Jan 2016 13:25:18 +0000 Subject: Cleaned up printer declaration --- server/src/Thermoprint/Server/Printer/Debug.hs | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'server/src/Thermoprint/Server/Printer') diff --git a/server/src/Thermoprint/Server/Printer/Debug.hs b/server/src/Thermoprint/Server/Printer/Debug.hs index b8c1430..721ec84 100644 --- a/server/src/Thermoprint/Server/Printer/Debug.hs +++ b/server/src/Thermoprint/Server/Printer/Debug.hs @@ -1,11 +1,8 @@ {-# LANGUAGE OverloadedStrings #-} -{-# LANGUAGE RankNTypes #-} {-# LANGUAGE TemplateHaskell #-} -{-# LANGUAGE MultiParamTypeClasses #-} -{-# LANGUAGE FlexibleInstances #-} module Thermoprint.Server.Printer.Debug - ( Debug(..) + ( debugPrint ) where import Control.Monad.IO.Class @@ -24,13 +21,8 @@ import Data.List (intersperse) import Data.Foldable (toList) import Data.Monoid -data Debug = Debug - -instance Applicative m => IsPrinter Debug m where - printMethod _ = printMethod debugPrinter - -debugPrinter :: PrinterMethod -debugPrinter = PM $ (>> return Nothing) . $(logDebugS) "Printer.Debug" . T.pack . show . cotext' +debugPrint :: PrinterMethod +debugPrint = PM $ (>> return Nothing) . $(logDebugS) "Printer.Debug" . T.pack . show . cotext' cotext' :: Printout -> Text cotext' = mconcat . intersperse "\n\n" . map (mconcat . map cotext'' . toList) . toList -- cgit v1.2.3