From c304a9379ca9f869259370acd41b8eb4181e617b Mon Sep 17 00:00:00 2001 From: Troels Henriksen Date: Tue, 23 May 2023 20:21:12 +0200 Subject: [PATCH] Oops, print to right device. --- src/Futhark/Util/Pretty.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Futhark/Util/Pretty.hs b/src/Futhark/Util/Pretty.hs index 37db2e812d..402c90eba8 100644 --- a/src/Futhark/Util/Pretty.hs +++ b/src/Futhark/Util/Pretty.hs @@ -49,7 +49,7 @@ import Prettyprinter.Render.Terminal (AnsiStyle, Color (..), bgColor, bgColorDul import Prettyprinter.Render.Terminal qualified import Prettyprinter.Render.Text qualified import Prettyprinter.Symbols.Ascii -import System.IO (Handle, hIsTerminalDevice, stdout) +import System.IO (Handle, hIsTerminalDevice, hPutStrLn, stdout) -- | Print a doc with styling to the given file; stripping colors if -- the file does not seem to support such things. @@ -67,7 +67,7 @@ hPutDoc h d = do hPutDocLn :: Handle -> Doc AnsiStyle -> IO () hPutDocLn h d = do hPutDoc h d - putStrLn "" + hPutStrLn h "" -- | Like 'hPutDoc', but to stdout. putDoc :: Doc AnsiStyle -> IO () @@ -75,8 +75,8 @@ putDoc = hPutDoc stdout -- | Like 'putDoc', but with a final newline. putDocLn :: Doc AnsiStyle -> IO () -putDocLn h = do - putDoc h +putDocLn d = do + putDoc d putStrLn "" -- | Produce text suitable for printing on the given handle. This