safe-coloured-text-terminfo 0.0.0.0 → 0.1.0.0
raw patch · 2 files changed
+34/−8 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Text.Colour.Term: hPutChunksLocale :: Handle -> [Chunk] -> IO ()
+ Text.Colour.Term: hPutChunksUtf8 :: Handle -> [Chunk] -> IO ()
+ Text.Colour.Term: putChunksLocale :: [Chunk] -> IO ()
+ Text.Colour.Term: putChunksUtf8 :: [Chunk] -> IO ()
Files
safe-coloured-text-terminfo.cabal view
@@ -1,11 +1,11 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.34.4.+-- This file has been generated from package.yaml by hpack version 0.34.7. -- -- see: https://github.com/sol/hpack name: safe-coloured-text-terminfo-version: 0.0.0.0+version: 0.1.0.0 synopsis: Safely output coloured text category: User Interfaces homepage: https://github.com/NorfairKing/safe-coloured-text#readme
src/Text/Colour/Term.hs view
@@ -7,15 +7,41 @@ -- | Print a list of chunks to 'stdout'. -- -- This function will use 'getTerminalCapabilitiesHandle' on 'stdout'.--- If you intend to use this function more than once, it is more efficient to use 'getTerminalCapabilitiesFromEnv' first and then use 'putChunksWith'.+-- If you intend to use this function more than once, it is more efficient to use 'getTerminalCapabilitiesFromEnv' first and then use 'putChunksUtf8With'.+putChunksUtf8 :: [Chunk] -> IO ()+putChunksUtf8 = hPutChunksUtf8 stdout++-- | Print a list of chunks to 'stdout' in an encoding according to the system's locale.+--+-- This function will use 'getTerminalCapabilitiesHandle' on 'stdout'.+-- If you intend to use this function more than once, it is more efficient to use 'getTerminalCapabilitiesFromEnv' first and then use 'putChunksLocaleWith'.+putChunksLocale :: [Chunk] -> IO ()+putChunksLocale = hPutChunksLocale stdout++-- | Deprecated synonym of putChunksUtf8 putChunks :: [Chunk] -> IO ()-putChunks = hPutChunks stdout+putChunks = putChunksUtf8+{-# DEPRECATED putChunks "Use putChunksLocale, or putChunksUtf8 if you must." #-} -- | Print a list of chunks to the given 'Handle' -- -- This function will use 'getTerminalCapabilitiesHandle' on the given handle.--- If you intend to use this function more than once, it is more efficient to use 'getTerminalCapabilitiesHandle' first and then use 'hPutChunksWith'.-hPutChunks :: Handle -> [Chunk] -> IO ()-hPutChunks h cs = do+-- If you intend to use this function more than once, it is more efficient to use 'getTerminalCapabilitiesHandle' first and then use 'hPutChunksUtf8With'.+hPutChunksUtf8 :: Handle -> [Chunk] -> IO ()+hPutChunksUtf8 h cs = do tc <- getTerminalCapabilitiesFromHandle h- hPutChunksWith tc h cs+ hPutChunksUtf8With tc h cs++-- | Print a list of chunks to the given 'Handle' in an encoding according to the system's locale.+--+-- This function will use 'getTerminalCapabilitiesHandle' on the given handle.+-- If you intend to use this function more than once, it is more efficient to use 'getTerminalCapabilitiesHandle' first and then use 'hPutChunksLocaleWith'.+hPutChunksLocale :: Handle -> [Chunk] -> IO ()+hPutChunksLocale h cs = do+ tc <- getTerminalCapabilitiesFromHandle h+ hPutChunksLocaleWith tc h cs++-- | Deprecated synonym of 'hPutChunksUtf8'+hPutChunks :: Handle -> [Chunk] -> IO ()+hPutChunks = hPutChunksUtf8+{-# DEPRECATED hPutChunks "Use hPutChunksLocale, or hPutChunksUtf8 if you must." #-}