packages feed

hformat 0.3.0.0 → 0.3.1.0

raw patch · 2 files changed

+4/−4 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

hformat.cabal view
@@ -1,5 +1,5 @@ name:                hformat
-version:             0.3.0.0
+version:             0.3.1.0
 synopsis:            Simple Haskell formatting
 description: String formatting
 homepage:            http://github.com/mvoidex/hformat
src/Text/Format/Colored.hs view
@@ -18,9 +18,9 @@ coloredLine = hColoredLine stdout
 
 hColored ∷ Handle → Formatted → IO ()
-hColored h (Formatted fs) = mapM_ go fs >> setSGR [] where
-	go (FormattedPart flags v) = setFlags flags >> hPutStr h v >> setSGR []
-	setFlags = setSGR ∘ mapMaybe toSGR
+hColored h (Formatted fs) = mapM_ go fs >> hSetSGR h [] where
+	go (FormattedPart flags v) = setFlags flags >> hPutStr h v >> hSetSGR h []
+	setFlags = hSetSGR h ∘ mapMaybe toSGR
 	toSGR "bold" = Just $ SetConsoleIntensity BoldIntensity
 	toSGR "italic" = Just $ SetItalicized True
 	toSGR "undelined" = Just $ SetUnderlining SingleUnderline