packages feed

safe-coloured-text 0.2.0.2 → 0.3.0.0

raw patch · 4 files changed

+8/−42 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Text.Colour: hPutChunksWith :: TerminalCapabilities -> Handle -> [Chunk] -> IO ()
- Text.Colour: putChunksWith :: TerminalCapabilities -> [Chunk] -> IO ()
- Text.Colour: renderChunk :: TerminalCapabilities -> Chunk -> Builder
- Text.Colour: renderChunkBS :: TerminalCapabilities -> Chunk -> ByteString
- Text.Colour: renderChunks :: Foldable f => TerminalCapabilities -> f Chunk -> Builder
- Text.Colour: renderChunksBS :: Foldable f => TerminalCapabilities -> f Chunk -> ByteString
- Text.Colour.Chunk: renderChunk :: TerminalCapabilities -> Chunk -> Builder
- Text.Colour.Chunk: renderChunkBS :: TerminalCapabilities -> Chunk -> ByteString
- Text.Colour.Chunk: renderChunks :: Foldable f => TerminalCapabilities -> f Chunk -> Builder
- Text.Colour.Chunk: renderChunksBS :: Foldable f => TerminalCapabilities -> f Chunk -> ByteString

Files

CHANGELOG.md view
@@ -1,5 +1,11 @@ # Changelog for safe-coloured-text +## [0.3.0.0] - 2024-03-26++### Removed++* Removed deprecated functions+ ## [0.2.0.2] - 2024-03-26  ### Changed
safe-coloured-text.cabal view
@@ -5,7 +5,7 @@ -- see: https://github.com/sol/hpack  name:           safe-coloured-text-version:        0.2.0.2+version:        0.3.0.0 synopsis:       Safely output coloured text category:       User Interfaces homepage:       https://github.com/NorfairKing/safe-coloured-text#readme
src/Text/Colour.hs view
@@ -86,14 +86,6 @@     renderChunksBuilder,     renderChunkBuilder, -    -- ** Decrecated rendering chunks to strict bytestring in UTF8-    renderChunksBS,-    renderChunkBS,--    -- ** Deprecated rendering chunks to lazy bytestring builders in UTF8-    renderChunks,-    renderChunk,-     -- * IO     TerminalCapabilities (..), @@ -102,8 +94,6 @@     putChunksLocaleWith,     hPutChunksUtf8With,     hPutChunksLocaleWith,-    putChunksWith,-    hPutChunksWith,   ) where @@ -119,12 +109,7 @@  -- | Print a list of chunks to stdout with given 'TerminalCapabilities' in an encoding according to the system's locale. putChunksLocaleWith :: TerminalCapabilities -> [Chunk] -> IO ()-putChunksLocaleWith tc = hPutChunksWith tc stdout---- | Deprecated synonym of 'putChunksUtf8With'-putChunksWith :: TerminalCapabilities -> [Chunk] -> IO ()-putChunksWith = putChunksUtf8With-{-# DEPRECATED putChunksWith "Use putChunksLocaleWith, or putChunksUtf8With if you must." #-}+putChunksLocaleWith tc = hPutChunksLocaleWith tc stdout  -- | Print a list of chunks to the given 'Handle' with given 'TerminalCapabilities'. hPutChunksUtf8With :: TerminalCapabilities -> Handle -> [Chunk] -> IO ()@@ -133,8 +118,3 @@ -- | Print a list of chunks to the given 'Handle' with given 'TerminalCapabilities' in an encoding according to the system's locale. hPutChunksLocaleWith :: TerminalCapabilities -> Handle -> [Chunk] -> IO () hPutChunksLocaleWith tc h cs = TIO.hPutStr h $ renderChunksText tc cs---- | Deprecated synonym of 'hPutChunksUtf8With'-hPutChunksWith :: TerminalCapabilities -> Handle -> [Chunk] -> IO ()-hPutChunksWith = hPutChunksUtf8With-{-# DEPRECATED hPutChunksWith "Use hPutChunksLocaleWith, or hPutChunksUtf8With if you must." #-}
src/Text/Colour/Chunk.hs view
@@ -59,20 +59,10 @@ renderChunksUtf8BS :: Foldable f => TerminalCapabilities -> f Chunk -> ByteString renderChunksUtf8BS tc = TE.encodeUtf8 . renderChunksText tc --- | Deprecated synonym for 'renderChunksUtf8BS'-renderChunksBS :: Foldable f => TerminalCapabilities -> f Chunk -> ByteString-renderChunksBS = renderChunksUtf8BS-{-# DEPRECATED renderChunksBS "Use renderChunksText, or renderChunksUtf8BS if you must." #-}- -- | Render chunks to a UTF8-encoded 'ByteString' 'Bytestring.Builder'. renderChunksUtf8BSBuilder :: Foldable f => TerminalCapabilities -> f Chunk -> ByteString.Builder renderChunksUtf8BSBuilder tc = foldMap (renderChunkUtf8BSBuilder tc) --- | Deprecated synonym for 'renderChunksUtf8BSBuilder'-renderChunks :: Foldable f => TerminalCapabilities -> f Chunk -> ByteString.Builder-renderChunks = renderChunksUtf8BSBuilder-{-# DEPRECATED renderChunks "Use renderChunksBuilder, or renderChunksUtf8BSBuilder if you must." #-}- -- | Render chunks directly to strict 'Text'. renderChunksText :: Foldable f => TerminalCapabilities -> f Chunk -> Text renderChunksText tc = LT.toStrict . renderChunksLazyText tc@@ -89,19 +79,9 @@ renderChunkUtf8BS :: TerminalCapabilities -> Chunk -> ByteString renderChunkUtf8BS tc = TE.encodeUtf8 . renderChunkText tc --- | Deprecated synonym for 'renderChunkUtf8BS'-renderChunkBS :: TerminalCapabilities -> Chunk -> ByteString-renderChunkBS = renderChunkUtf8BS-{-# DEPRECATED renderChunkBS "Use renderChunkText, or renderChunkUtf8BS if you must." #-}- -- | Render a chunk directly to a UTF8-encoded 'Bytestring' 'ByteString.Builder'. renderChunkUtf8BSBuilder :: TerminalCapabilities -> Chunk -> ByteString.Builder renderChunkUtf8BSBuilder tc = LTE.encodeUtf8Builder . renderChunkLazyText tc---- | Deprecated synonym for 'renderChunkUtf8BSBuilder'-renderChunk :: TerminalCapabilities -> Chunk -> ByteString.Builder-renderChunk = renderChunkUtf8BSBuilder-{-# DEPRECATED renderChunk "Use renderChunkBuilder, or renderChunkUtf8BSBuilder if you must." #-}  -- | Render a chunk directly to strict 'Text'. renderChunkText :: TerminalCapabilities -> Chunk -> Text