commit ghc-rio for openSUSE:Factory
Hello community, here is the log from the commit of package ghc-rio for openSUSE:Factory checked in at 2019-07-29 17:26:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-rio (Old) and /work/SRC/openSUSE:Factory/.ghc-rio.new.4126 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "ghc-rio" Mon Jul 29 17:26:46 2019 rev:8 rq:715418 version:0.1.10.0 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-rio/ghc-rio.changes 2019-04-28 20:13:33.534414545 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-rio.new.4126/ghc-rio.changes 2019-07-29 17:26:53.590291066 +0200 @@ -1,0 +2,17 @@ +Tue Jul 2 02:02:09 UTC 2019 - psimons@suse.com + +- Update rio to version 0.1.10.0. + ## 0.1.10.0 + + * Relax a bunch of `RIO.File` functions from `MonadUnliftIO` to `MonadIO` + * Custom `Monoid` instance for `Utf8Builder` that matches semantics of the + derived one, but doesn't break list fusion + * Qualified import recommendations for `*.Partial`, `*.Unchecked`, `*.Unsafe` + * Re-export `Data.Ord.Down` from `RIO.Prelude` + * Addition of `RIO.NonEmpty` module + * Addition of `RIO.NonEmpty.Partial` module + * Export `NonEmpty` type and its constructor `(:|)` from RIO.Prelude.Types + * Fix handling of non-ASCII characters in `logSticky` + * Deprecate `withProcess` and `withProcess_`, add `withProcessWait`, `withProcessWait_`, `withProcessTerm`, and `withProcessTerm_` + +------------------------------------------------------------------- Old: ---- rio-0.1.9.2.tar.gz New: ---- rio-0.1.10.0.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-rio.spec ++++++ --- /var/tmp/diff_new_pack.9BqAcL/_old 2019-07-29 17:26:54.202290839 +0200 +++ /var/tmp/diff_new_pack.9BqAcL/_new 2019-07-29 17:26:54.206290838 +0200 @@ -19,7 +19,7 @@ %global pkg_name rio %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.1.9.2 +Version: 0.1.10.0 Release: 0 Summary: A standard library for Haskell License: MIT ++++++ rio-0.1.9.2.tar.gz -> rio-0.1.10.0.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/ChangeLog.md new/rio-0.1.10.0/ChangeLog.md --- old/rio-0.1.9.2/ChangeLog.md 2019-04-15 05:50:18.000000000 +0200 +++ new/rio-0.1.10.0/ChangeLog.md 2019-06-26 06:58:28.000000000 +0200 @@ -1,5 +1,18 @@ # Changelog for rio +## 0.1.10.0 + +* Relax a bunch of `RIO.File` functions from `MonadUnliftIO` to `MonadIO` +* Custom `Monoid` instance for `Utf8Builder` that matches semantics of the + derived one, but doesn't break list fusion +* Qualified import recommendations for `*.Partial`, `*.Unchecked`, `*.Unsafe` +* Re-export `Data.Ord.Down` from `RIO.Prelude` +* Addition of `RIO.NonEmpty` module +* Addition of `RIO.NonEmpty.Partial` module +* Export `NonEmpty` type and its constructor `(:|)` from RIO.Prelude.Types +* Fix handling of non-ASCII characters in `logSticky` +* Deprecate `withProcess` and `withProcess_`, add `withProcessWait`, `withProcessWait_`, `withProcessTerm`, and `withProcessTerm_` + ## 0.1.9.2 * Bring back re-export of `Monad.fail` from `RIO.Prelude`. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/rio.cabal new/rio-0.1.10.0/rio.cabal --- old/rio-0.1.9.2/rio.cabal 2019-04-15 05:57:10.000000000 +0200 +++ new/rio-0.1.10.0/rio.cabal 2019-06-26 07:00:08.000000000 +0200 @@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.31.1. +-- This file has been generated from package.yaml by hpack version 0.31.2. -- -- see: https://github.com/sol/hpack -- --- hash: c33027526ffc54db8cec5929c470c83ccf256752d6502bae18316d3ccd807bf9 +-- hash: a9a19c2ab9bf97b6ca7f930086169ac5fd4ae379d215117d19b7d9533058b4a8 name: rio -version: 0.1.9.2 +version: 0.1.10.0 synopsis: A standard library for Haskell description: See README and Haddocks at <https://www.stackage.org/package/rio> category: Control @@ -47,6 +47,8 @@ RIO.Map RIO.Map.Partial RIO.Map.Unchecked + RIO.NonEmpty + RIO.NonEmpty.Partial RIO.Partial RIO.Prelude RIO.Prelude.Simple @@ -105,7 +107,7 @@ , process , text , time - , typed-process >=0.2.2.0 + , typed-process >=0.2.5.0 , unliftio >=0.2.8.0 , unliftio-core , unordered-containers @@ -154,7 +156,7 @@ , rio , text , time - , typed-process >=0.2.2.0 + , typed-process >=0.2.5.0 , unliftio >=0.2.8.0 , unliftio-core , unordered-containers diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/ByteString/Lazy/Partial.hs new/rio-0.1.10.0/src/RIO/ByteString/Lazy/Partial.hs --- old/rio-0.1.9.2/src/RIO/ByteString/Lazy/Partial.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/ByteString/Lazy/Partial.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,5 +1,6 @@ --- | This module exports all the partial functions from "Data.ByteString.Lazy" - +-- | Lazy @ByteString@ partial functions. Import as: +-- +-- > import qualified RIO.ByteString.Lazy.Partial as BL' module RIO.ByteString.Lazy.Partial ( -- * Basic interface diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/ByteString/Lazy.hs new/rio-0.1.10.0/src/RIO/ByteString/Lazy.hs --- old/rio-0.1.9.2/src/RIO/ByteString/Lazy.hs 2018-03-19 09:18:53.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/ByteString/Lazy.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,7 +1,11 @@ +{-# LANGUAGE NoImplicitPrelude #-} + -- | Lazy @ByteString@. Import as: -- -- > import qualified RIO.ByteString.Lazy as BL -{-# LANGUAGE NoImplicitPrelude #-} +-- +-- This module does not export any partial functions. For those, see +-- "RIO.ByteString.Lazy.Partial" module RIO.ByteString.Lazy ( -- * The @ByteString@ type diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/ByteString/Partial.hs new/rio-0.1.10.0/src/RIO/ByteString/Partial.hs --- old/rio-0.1.9.2/src/RIO/ByteString/Partial.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/ByteString/Partial.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,5 +1,6 @@ --- | This module exports all the partial functions from 'Data.ByteString' - +-- | Strict @ByteString@ partial functions. Import as: +-- +-- > import qualified RIO.ByteString.Partial as B' module RIO.ByteString.Partial ( -- * Basic interface diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/ByteString.hs new/rio-0.1.10.0/src/RIO/ByteString.hs --- old/rio-0.1.9.2/src/RIO/ByteString.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/ByteString.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,7 +1,11 @@ +{-# LANGUAGE NoImplicitPrelude #-} + -- | Strict @ByteString@. Import as: -- -- > import qualified RIO.ByteString as B -{-# LANGUAGE NoImplicitPrelude #-} +-- +-- This module does not export any partial functions. For those, see +-- "RIO.ByteString.Partial" module RIO.ByteString ( module Data.ByteString , module RIO.ByteString diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Char/Partial.hs new/rio-0.1.10.0/src/RIO/Char/Partial.hs --- old/rio-0.1.9.2/src/RIO/Char/Partial.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Char/Partial.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,3 +1,6 @@ +-- | Unicode @Char@ partial functions. Import as: +-- +-- > import qualified RIO.Char.Partial as C' module RIO.Char.Partial ( -- * Single digit characters diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Char.hs new/rio-0.1.10.0/src/RIO/Char.hs --- old/rio-0.1.9.2/src/RIO/Char.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Char.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,6 +1,9 @@ -- | Unicode @Char@. Import as: -- -- > import qualified RIO.Char as C +-- +-- This module does not export any partial functions. For those, see +-- "RIO.Char.Partial" module RIO.Char ( Data.Char.Char diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/File.hs new/rio-0.1.10.0/src/RIO/File.hs --- old/rio-0.1.9.2/src/RIO/File.hs 2018-12-06 09:29:44.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/File.hs 2019-04-15 16:41:06.000000000 +0200 @@ -229,8 +229,8 @@ -- otherwise async exceptions may leave file descriptors open. -- -- @since 0.1.6 -openFileAndDirectory :: MonadUnliftIO m => FilePath -> IOMode -> m (Fd, Handle) -openFileAndDirectory absFp iomode = do +openFileAndDirectory :: MonadIO m => FilePath -> IOMode -> m (Fd, Handle) +openFileAndDirectory absFp iomode = liftIO $ do let dir = takeDirectory absFp fp = takeFileName absFp @@ -257,16 +257,16 @@ fsyncFileDescriptor "closeFileDurable/Directory" cDirFd) (closeDirectory dirFd) -buildTemporaryFilePath :: MonadUnliftIO m => FilePath -> m FilePath -buildTemporaryFilePath filePath = do +buildTemporaryFilePath :: MonadIO m => FilePath -> m FilePath +buildTemporaryFilePath filePath = liftIO $ do let dirFp = takeDirectory filePath fileFp = takeFileName filePath - bracket (liftIO $ openBinaryTempFile dirFp fileFp) + bracket (openBinaryTempFile dirFp fileFp) (hClose . snd) (return . fst) -toTmpFilePath :: MonadUnliftIO m => FilePath -> m FilePath +toTmpFilePath :: MonadIO m => FilePath -> m FilePath toTmpFilePath filePath = buildTemporaryFilePath (dirPath </> tmpFilename) where @@ -296,7 +296,7 @@ -- -- @since 0.1.6 closeFileDurableAtomic :: - MonadUnliftIO m => FilePath -> FilePath -> Fd -> Handle -> m () + MonadIO m => FilePath -> FilePath -> Fd -> Handle -> m () closeFileDurableAtomic tmpFilePath filePath dirFd@(Fd cDirFd) fileHandle = do liftIO $ finally @@ -332,11 +332,12 @@ -- This function is a noop on Windows platforms. -- -- @since 0.1.6 -ensureFileDurable :: MonadUnliftIO m => FilePath -> m () +ensureFileDurable :: MonadIO m => FilePath -> m () ensureFileDurable absFp = #if WINDOWS absFp `seq` return () #else + liftIO $ bracket (openFileAndDirectory absFp ReadMode) (uncurry closeFileDurable) (const $ return ()) @@ -352,12 +353,12 @@ -- This function behaves the same as 'RIO.writeFileBinary' on Windows platforms. -- -- @since 0.1.6 -writeBinaryFileDurable :: MonadUnliftIO m => FilePath -> ByteString -> m () +writeBinaryFileDurable :: MonadIO m => FilePath -> ByteString -> m () writeBinaryFileDurable absFp bytes = #if WINDOWS - writeFileBinary absFp bytes + liftIO $ writeFileBinary absFp bytes #else - withBinaryFileDurable absFp WriteMode (liftIO . (`hPut` bytes)) + liftIO $ withBinaryFileDurable absFp WriteMode (liftIO . (`hPut` bytes)) #endif -- | Similar to 'writeFileBinary', but it also guarantes that changes executed @@ -370,12 +371,12 @@ -- This function behaves the same as 'RIO.writeFileBinary' on Windows platforms. -- -- @since 0.1.6 -writeBinaryFileDurableAtomic :: MonadUnliftIO m => FilePath -> ByteString -> m () +writeBinaryFileDurableAtomic :: MonadIO m => FilePath -> ByteString -> m () writeBinaryFileDurableAtomic fp bytes = #if WINDOWS - writeFileBinary fp bytes + liftIO $ writeFileBinary fp bytes #else - withBinaryFileDurableAtomic fp WriteMode (liftIO . (`hPut` bytes)) + liftIO $ withBinaryFileDurableAtomic fp WriteMode (liftIO . (`hPut` bytes)) #endif -- | Opens a file with the following guarantees: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/HashMap/Partial.hs new/rio-0.1.10.0/src/RIO/HashMap/Partial.hs --- old/rio-0.1.9.2/src/RIO/HashMap/Partial.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/HashMap/Partial.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,3 +1,6 @@ +-- | Strict @HashMap@ partial functions. Import as: +-- +-- > import qualified RIO.HashMap.Partial as HM' module RIO.HashMap.Partial ( -- * Basic interface diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/HashMap.hs new/rio-0.1.10.0/src/RIO/HashMap.hs --- old/rio-0.1.9.2/src/RIO/HashMap.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/HashMap.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,6 +1,9 @@ -- | Strict @Map@ with hashed keys. Import as: -- -- > import qualified RIO.HashMap as HM +-- +-- This module does not export any partial functions. For those, see +-- "RIO.HashMap.Partial" module RIO.HashMap ( Data.HashMap.Strict.HashMap diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/List/Partial.hs new/rio-0.1.10.0/src/RIO/List/Partial.hs --- old/rio-0.1.9.2/src/RIO/List/Partial.hs 2018-06-19 17:29:26.000000000 +0200 +++ new/rio-0.1.10.0/src/RIO/List/Partial.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,3 +1,6 @@ +-- | @List@ partial functions. Import as: +-- +-- > import qualified RIO.List.Partial as L' module RIO.List.Partial ( -- * Basic functions diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/List.hs new/rio-0.1.10.0/src/RIO/List.hs --- old/rio-0.1.9.2/src/RIO/List.hs 2018-12-20 15:39:02.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/List.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,6 +1,9 @@ -- | @List@. Import as: -- -- > import qualified RIO.List as L +-- +-- This module does not export any partial functions. For those, see +-- "RIO.List.Partial" module RIO.List ( -- * Basic functions diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Map/Partial.hs new/rio-0.1.10.0/src/RIO/Map/Partial.hs --- old/rio-0.1.9.2/src/RIO/Map/Partial.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Map/Partial.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,3 +1,6 @@ +-- | Strict @Map@ partial functions. Import as: +-- +-- > import qualified RIO.Map.Partial as Map' module RIO.Map.Partial ( -- * Operators diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Map/Unchecked.hs new/rio-0.1.10.0/src/RIO/Map/Unchecked.hs --- old/rio-0.1.9.2/src/RIO/Map/Unchecked.hs 2019-03-12 10:21:13.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Map/Unchecked.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,9 +1,11 @@ {-# LANGUAGE CPP #-} --- | This module contains functions from "Data.Map.strict" that have unchecked + +-- | This module contains functions from "Data.Map.Strict" that have unchecked -- preconditions on their input. If these preconditions are not satisfied, -- the data structure may end up in an invalid state and other operations --- may misbehave. - +-- may misbehave. Import as: +-- +-- > import qualified RIO.Map.Unchecked as Map' module RIO.Map.Unchecked ( -- * Traversal diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Map.hs new/rio-0.1.10.0/src/RIO/Map.hs --- old/rio-0.1.9.2/src/RIO/Map.hs 2019-03-12 10:21:13.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Map.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,7 +1,11 @@ {-# LANGUAGE CPP #-} + -- | Strict @Map@. Import as: -- -- > import qualified RIO.Map as Map +-- +-- This module does not export any partial or unchecked functions. For those, +-- see "RIO.Map.Partial" and "RIO.Map.Unchecked" module RIO.Map ( -- * Map type diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/NonEmpty/Partial.hs new/rio-0.1.10.0/src/RIO/NonEmpty/Partial.hs --- old/rio-0.1.9.2/src/RIO/NonEmpty/Partial.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/NonEmpty/Partial.hs 2019-06-26 06:57:48.000000000 +0200 @@ -0,0 +1,14 @@ +-- | @NonEmpty@ list partial functions. Import as: +-- +-- > import qualified RIO.NonEmpty.Partial as NE' +module RIO.NonEmpty.Partial + ( + -- * Indexing streams + (Data.List.NonEmpty.!!) + + -- * Converting to and from a list + , Data.List.NonEmpty.fromList + + ) where + +import qualified Data.List.NonEmpty diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/NonEmpty.hs new/rio-0.1.10.0/src/RIO/NonEmpty.hs --- old/rio-0.1.9.2/src/RIO/NonEmpty.hs 1970-01-01 01:00:00.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/NonEmpty.hs 2019-06-26 06:57:48.000000000 +0200 @@ -0,0 +1,83 @@ +-- | @NonEmpty@ list. Import as: +-- +-- > import qualified RIO.NonEmpty as NE +-- +-- This module does not export any partial functions. For those, see +-- "RIO.NonEmpty.Partial" +module RIO.NonEmpty + ( + -- * The type of non-empty streams + Data.List.NonEmpty.NonEmpty(..) + + -- * Non-empty stream transformations + , Data.List.NonEmpty.map + , Data.List.NonEmpty.intersperse + , Data.List.NonEmpty.scanl + , Data.List.NonEmpty.scanr + , Data.List.NonEmpty.scanl1 + , Data.List.NonEmpty.scanr1 + , Data.List.NonEmpty.transpose + , Data.List.NonEmpty.sortBy + , Data.List.NonEmpty.sortWith + + -- * Basic functions + , Data.List.NonEmpty.length + , Data.List.NonEmpty.head + , Data.List.NonEmpty.tail + , Data.List.NonEmpty.last + , Data.List.NonEmpty.init + , (Data.List.NonEmpty.<|) + , Data.List.NonEmpty.cons + , Data.List.NonEmpty.uncons + , Data.List.NonEmpty.unfoldr + , Data.List.NonEmpty.sort + , Data.List.NonEmpty.reverse + , Data.List.NonEmpty.inits + , Data.List.NonEmpty.tails + + -- * Building streams + , Data.List.NonEmpty.iterate + , Data.List.NonEmpty.repeat + , Data.List.NonEmpty.cycle + , Data.List.NonEmpty.insert + , Data.List.NonEmpty.some1 + + -- * Extracting sublists + , Data.List.NonEmpty.take + , Data.List.NonEmpty.drop + , Data.List.NonEmpty.splitAt + , Data.List.NonEmpty.takeWhile + , Data.List.NonEmpty.dropWhile + , Data.List.NonEmpty.span + , Data.List.NonEmpty.break + , Data.List.NonEmpty.filter + , Data.List.NonEmpty.partition + , Data.List.NonEmpty.group + , Data.List.NonEmpty.groupBy + , Data.List.NonEmpty.groupWith + , Data.List.NonEmpty.groupAllWith + , Data.List.NonEmpty.group1 + , Data.List.NonEmpty.groupBy1 + , Data.List.NonEmpty.groupWith1 + , Data.List.NonEmpty.groupAllWith1 + + -- * Sublist predicates + , Data.List.NonEmpty.isPrefixOf + + -- * Set-like operations + , Data.List.NonEmpty.nub + , Data.List.NonEmpty.nubBy + + -- * Zipping and unzipping streams + , Data.List.NonEmpty.zip + , Data.List.NonEmpty.zipWith + , Data.List.NonEmpty.unzip + + -- * Converting to and from a list + , Data.List.NonEmpty.nonEmpty + , Data.List.NonEmpty.toList + , Data.List.NonEmpty.xor + + ) where + +import qualified Data.List.NonEmpty diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Partial.hs new/rio-0.1.10.0/src/RIO/Partial.hs --- old/rio-0.1.9.2/src/RIO/Partial.hs 2019-02-27 04:58:47.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Partial.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,5 +1,6 @@ --- | Partial functions. +-- | Partial functions. Import as: -- +-- > import qualified RIO.Partial as RIO' module RIO.Partial ( Data.Maybe.fromJust , Prelude.read diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Prelude/Display.hs new/rio-0.1.10.0/src/RIO/Prelude/Display.hs --- old/rio-0.1.9.2/src/RIO/Prelude/Display.hs 2018-12-27 19:06:38.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Prelude/Display.hs 2019-06-26 06:57:48.000000000 +0200 @@ -14,7 +14,7 @@ import qualified Data.ByteString.Lazy as BL import qualified Data.ByteString.Builder as BB import Data.ByteString.Builder (Builder) -import Data.Semigroup (Semigroup) +import Data.Semigroup (Semigroup(..)) import Data.Text (Text) import qualified Data.Text.Lazy as TL import qualified Data.Text.Lazy.Encoding as TL @@ -30,7 +30,17 @@ -- -- @since 0.1.0.0 newtype Utf8Builder = Utf8Builder { getUtf8Builder :: Builder } - deriving (Semigroup, Monoid) + deriving (Semigroup) + +-- Custom instance is created instead of deriving, otherwise list fusion breaks +-- for `mconcat`. +instance Monoid Utf8Builder where + mempty = Utf8Builder mempty + {-# INLINE mempty #-} + mappend = (Data.Semigroup.<>) + {-# INLINE mappend #-} + mconcat = foldr mappend mempty + {-# INLINE mconcat #-} -- | @since 0.1.0.0 instance IsString Utf8Builder where diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Prelude/Logger.hs new/rio-0.1.10.0/src/RIO/Prelude/Logger.hs --- old/rio-0.1.9.2/src/RIO/Prelude/Logger.hs 2019-04-11 09:22:33.000000000 +0200 +++ new/rio-0.1.10.0/src/RIO/Prelude/Logger.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,6 +1,7 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE NoImplicitPrelude #-} +{-# LANGUAGE BangPatterns #-} module RIO.Prelude.Logger ( -- ** Running with logging withLogFunc @@ -60,6 +61,7 @@ import GHC.Stack (HasCallStack, CallStack, SrcLoc (..), getCallStack, callStack) import Data.Time import qualified Data.Text.IO as TIO +import Data.Bits import Data.ByteString.Builder (toLazyByteString, char7, byteString, hPutBuilder) import Data.ByteString.Builder.Extra (flush) import GHC.IO.Handle.Internals (wantWritableHandle) @@ -359,12 +361,12 @@ newLogFunc :: (MonadIO n, MonadIO m) => LogOptions -> n (LogFunc, m ()) newLogFunc options = if logTerminal options then do - var <- newMVar mempty + var <- newMVar (mempty,0) return (LogFunc { unLogFunc = stickyImpl var options (simpleLogFunc options) , lfOptions = Just options } - , do state <- takeMVar var + , do (state,_) <- takeMVar var unless (B.null state) (liftIO $ logSend options "\n") ) else @@ -579,12 +581,12 @@ length (formatTime defaultTimeLocale "%F %T.000000" (UTCTime (ModifiedJulianDay 0) 0)) stickyImpl - :: MVar ByteString -> LogOptions + :: MVar (ByteString,Int) -> LogOptions -> (CallStack -> LogSource -> LogLevel -> Utf8Builder -> IO ()) -> CallStack -> LogSource -> LogLevel -> Utf8Builder -> IO () -stickyImpl ref lo logFunc loc src level msgOrig = modifyMVar_ ref $ \sticky -> do +stickyImpl ref lo logFunc loc src level msgOrig = modifyMVar_ ref $ \(sticky,stickyLen) -> do let backSpaceChar = '\8' - repeating = mconcat . replicate (B.length sticky) . char7 + repeating = mconcat . replicate stickyLen . char7 clear = logSend lo (repeating backSpaceChar <> repeating ' ' <> @@ -596,19 +598,37 @@ LevelOther "sticky-done" -> do clear logFunc loc src LevelInfo msgOrig - return mempty + return (mempty,0) LevelOther "sticky" -> do clear let bs = toStrictBytes $ toLazyByteString $ getUtf8Builder msgOrig logSend lo (byteString bs <> flush) - return bs + return (bs, utf8CharacterCount bs) _ | level >= logLevel -> do clear logFunc loc src level msgOrig unless (B.null sticky) $ logSend lo (byteString sticky <> flush) - return sticky - | otherwise -> return sticky + return (sticky,stickyLen) + | otherwise -> return (sticky,stickyLen) + +-- | The number of Unicode characters in a UTF-8 encoded byte string, +-- excluding ANSI CSI sequences. +utf8CharacterCount :: ByteString -> Int +utf8CharacterCount = go 0 + where + go !n bs = case B.uncons bs of + Nothing -> n + Just (c,bs) + | c .&. 0xC0 == 0x80 -> go n bs -- UTF-8 continuation + | c == 0x1B -> go n $ dropCSI bs -- ANSI escape + | otherwise -> go (n+1) bs + + dropCSI bs = case B.uncons bs of + Just (0x5B,bs2) -> B.drop 1 $ B.dropWhile isSequenceByte bs2 + _ -> bs + + isSequenceByte c = c >= 0x20 && c <= 0x3F -- | Is the log func configured to use color output? -- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Prelude/Types.hs new/rio-0.1.10.0/src/RIO/Prelude/Types.hs --- old/rio-0.1.9.2/src/RIO/Prelude/Types.hs 2019-04-13 21:04:04.000000000 +0200 +++ new/rio-0.1.10.0/src/RIO/Prelude/Types.hs 2019-06-26 06:57:48.000000000 +0200 @@ -60,6 +60,9 @@ -- *** @Either@ -- | Re-exported from "Data.Either": , Data.Either.Either(..) + -- *** @NonEmpty@ + -- | Re-exported from Data.List.NonEmpty + , Data.List.NonEmpty.NonEmpty(..) -- *** @Proxy@ -- | Re-exported from "Data.Proxy": , Data.Proxy.Proxy(..) @@ -325,6 +328,7 @@ import qualified Data.IntMap.Strict import qualified Data.IntSet import qualified Data.List +import qualified Data.List.NonEmpty import qualified Data.Map.Strict import qualified Data.Maybe import qualified Data.Ord diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Prelude.hs new/rio-0.1.10.0/src/RIO/Prelude.hs --- old/rio-0.1.9.2/src/RIO/Prelude.hs 2019-04-15 05:50:18.000000000 +0200 +++ new/rio-0.1.10.0/src/RIO/Prelude.hs 2019-06-26 06:57:48.000000000 +0200 @@ -58,6 +58,7 @@ , Data.Ord.min , Data.Ord.compare , Data.Ord.comparing + , Data.Ord.Down(..) -- * @Enum@ -- | Re-exported from "Prelude": @@ -442,4 +443,3 @@ import qualified Control.Monad.Primitive (primitive) import qualified Control.Monad.ST - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Process.hs new/rio-0.1.10.0/src/RIO/Process.hs --- old/rio-0.1.9.2/src/RIO/Process.hs 2018-08-02 07:33:18.000000000 +0200 +++ new/rio-0.1.10.0/src/RIO/Process.hs 2019-06-26 07:09:32.000000000 +0200 @@ -57,6 +57,10 @@ -- * Spawning (run child process) , withProcess , withProcess_ + , withProcessWait + , withProcessWait_ + , withProcessTerm + , withProcessTerm_ -- * Exec (replacing current process) , exec , execSpawn @@ -135,7 +139,11 @@ import System.Exit (exitWith) import qualified System.FilePath as FP import qualified System.Process.Typed as P -import System.Process.Typed hiding (withProcess, withProcess_, proc) +import System.Process.Typed hiding + (withProcess, withProcess_, + withProcessWait, withProcessWait_, + withProcessTerm, withProcessTerm_, + proc) #ifndef WINDOWS import System.Directory (setCurrentDirectory) @@ -431,7 +439,8 @@ => ProcessConfig stdin stdout stderr -> (Process stdin stdout stderr -> m a) -> m a -withProcess pc f = withRunInIO $ \run -> P.withProcess pc (run . f) +withProcess pc f = withRunInIO $ \run -> P.withProcessTerm pc (run . f) +{-# DEPRECATED withProcess "Please consider using withProcessWait, or instead use withProcessTerm" #-} -- | Same as 'P.withProcess_', but generalized to 'MonadUnliftIO'. -- @@ -441,7 +450,48 @@ => ProcessConfig stdin stdout stderr -> (Process stdin stdout stderr -> m a) -> m a -withProcess_ pc f = withRunInIO $ \run -> P.withProcess_ pc (run . f) +withProcess_ pc f = withRunInIO $ \run -> P.withProcessTerm_ pc (run . f) +{-# DEPRECATED withProcess_ "Please consider using withProcessWait, or instead use withProcessTerm" #-} + +-- | Same as 'P.withProcessWait', but generalized to 'MonadUnliftIO'. +-- +-- @since 0.1.10.0 +withProcessWait + :: MonadUnliftIO m + => ProcessConfig stdin stdout stderr + -> (Process stdin stdout stderr -> m a) + -> m a +withProcessWait pc f = withRunInIO $ \run -> P.withProcessWait pc (run . f) + +-- | Same as 'P.withProcessWait_', but generalized to 'MonadUnliftIO'. +-- +-- @since 0.1.10.0 +withProcessWait_ + :: MonadUnliftIO m + => ProcessConfig stdin stdout stderr + -> (Process stdin stdout stderr -> m a) + -> m a +withProcessWait_ pc f = withRunInIO $ \run -> P.withProcessWait_ pc (run . f) + +-- | Same as 'P.withProcessTerm', but generalized to 'MonadUnliftIO'. +-- +-- @since 0.1.10.0 +withProcessTerm + :: MonadUnliftIO m + => ProcessConfig stdin stdout stderr + -> (Process stdin stdout stderr -> m a) + -> m a +withProcessTerm pc f = withRunInIO $ \run -> P.withProcessTerm pc (run . f) + +-- | Same as 'P.withProcessTerm_', but generalized to 'MonadUnliftIO'. +-- +-- @since 0.1.10.0 +withProcessTerm_ + :: MonadUnliftIO m + => ProcessConfig stdin stdout stderr + -> (Process stdin stdout stderr -> m a) + -> m a +withProcessTerm_ pc f = withRunInIO $ \run -> P.withProcessTerm_ pc (run . f) -- | A convenience environment combining a 'LogFunc' and a 'ProcessContext' -- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Set/Partial.hs new/rio-0.1.10.0/src/RIO/Set/Partial.hs --- old/rio-0.1.9.2/src/RIO/Set/Partial.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Set/Partial.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,3 +1,6 @@ +-- | @Set@ partial functions. Import as: +-- +-- > import qualified RIO.Set.Partial as Set' module RIO.Set.Partial ( -- * Indexed diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Set/Unchecked.hs new/rio-0.1.10.0/src/RIO/Set/Unchecked.hs --- old/rio-0.1.9.2/src/RIO/Set/Unchecked.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Set/Unchecked.hs 2019-06-26 06:57:48.000000000 +0200 @@ -3,7 +3,9 @@ -- | This module contains functions from "Data.Set" that have unchecked -- preconditions on their input. If these preconditions are not satisfied, -- the data structure may end up in an invalid state and other operations --- may misbehave. +-- may misbehave. Import as: +-- +-- > import qualified RIO.Set.Unchecked as Set' module RIO.Set.Unchecked ( -- * Map diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Set.hs new/rio-0.1.10.0/src/RIO/Set.hs --- old/rio-0.1.9.2/src/RIO/Set.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Set.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,7 +1,11 @@ {-# LANGUAGE CPP #-} + -- | @Set@. Import as: -- -- > import qualified RIO.Set as Set +-- +-- This module does not export any partial or unchecked functions. For those, +-- see "RIO.Set.Partial" and "RIO.Set.Unchecked" module RIO.Set ( -- * Set type diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Text/Lazy/Partial.hs new/rio-0.1.10.0/src/RIO/Text/Lazy/Partial.hs --- old/rio-0.1.9.2/src/RIO/Text/Lazy/Partial.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Text/Lazy/Partial.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,5 +1,6 @@ --- | This module exports all the partial functions from "Data.Text.Lazy" - +-- | Lazy @Text@ partial functions. Import as: +-- +-- > import qualified RIO.Text.Lazy.Partial as TL' module RIO.Text.Lazy.Partial ( -- * Creation and elimination diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Text/Partial.hs new/rio-0.1.10.0/src/RIO/Text/Partial.hs --- old/rio-0.1.9.2/src/RIO/Text/Partial.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Text/Partial.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,5 +1,6 @@ --- | This module exports all the partial functions from "Data.Text" - +-- | Strict @Text@ partial functions. Import as: +-- +-- > import qualified RIO.Text.Partial as T' module RIO.Text.Partial ( -- * Basic interface diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Vector/Boxed/Partial.hs new/rio-0.1.10.0/src/RIO/Vector/Boxed/Partial.hs --- old/rio-0.1.9.2/src/RIO/Vector/Boxed/Partial.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Vector/Boxed/Partial.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,3 +1,6 @@ +-- | Boxed @Vector@ partial functions. Import as: +-- +-- > import qualified RIO.Vector.Boxed.Partial as VB' module RIO.Vector.Boxed.Partial ( -- * Accessors diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Vector/Boxed/Unsafe.hs new/rio-0.1.10.0/src/RIO/Vector/Boxed/Unsafe.hs --- old/rio-0.1.9.2/src/RIO/Vector/Boxed/Unsafe.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Vector/Boxed/Unsafe.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,3 +1,7 @@ +-- | Boxed @Vector@ unsafe functions. These perform no bounds +-- checking, and may cause segmentation faults etc.! Import as: +-- +-- > import qualified RIO.Vector.Boxed.Unsafe as VB' module RIO.Vector.Boxed.Unsafe ( -- * Accessors diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Vector/Boxed.hs new/rio-0.1.10.0/src/RIO/Vector/Boxed.hs --- old/rio-0.1.9.2/src/RIO/Vector/Boxed.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Vector/Boxed.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,7 +1,11 @@ {-# LANGUAGE CPP #-} + -- | Boxed @Vector@. Import as: -- -- > import qualified RIO.Vector.Boxed as VB +-- +-- This module does not export any partial or unsafe functions. For those, see +-- "RIO.Vector.Boxed.Partial" and "RIO.Vector.Boxed.Unsafe" module RIO.Vector.Boxed ( -- * Boxed vectors diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Vector/Partial.hs new/rio-0.1.10.0/src/RIO/Vector/Partial.hs --- old/rio-0.1.9.2/src/RIO/Vector/Partial.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Vector/Partial.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,3 +1,6 @@ +-- | Generic @Vector@ interface partial functions. Import as: +-- +-- > import qualified RIO.Vector.Partial as V' module RIO.Vector.Partial ( -- * Accessors diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Vector/Storable/Partial.hs new/rio-0.1.10.0/src/RIO/Vector/Storable/Partial.hs --- old/rio-0.1.9.2/src/RIO/Vector/Storable/Partial.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Vector/Storable/Partial.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,3 +1,6 @@ +-- | Storable @Vector@ partial functions. Import as: +-- +-- > import qualified RIO.Vector.Storable.Partial as VS' module RIO.Vector.Storable.Partial ( -- * Accessors diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Vector/Storable/Unsafe.hs new/rio-0.1.10.0/src/RIO/Vector/Storable/Unsafe.hs --- old/rio-0.1.9.2/src/RIO/Vector/Storable/Unsafe.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Vector/Storable/Unsafe.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,3 +1,7 @@ +-- | Storable @Vector@ unsafe functions. These perform no bounds +-- checking, and may cause segmentation faults etc.! Import as: +-- +-- > import qualified RIO.Vector.Storable.Unsafe as VS' module RIO.Vector.Storable.Unsafe ( -- * Accessors diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Vector/Storable.hs new/rio-0.1.10.0/src/RIO/Vector/Storable.hs --- old/rio-0.1.9.2/src/RIO/Vector/Storable.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Vector/Storable.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,7 +1,11 @@ {-# LANGUAGE CPP #-} + -- | Storable @Vector@. Import as: -- -- > import qualified RIO.Vector.Storable as VS +-- +-- This module does not export any partial or unsafe functions. For those, see +-- "RIO.Vector.Storable.Partial" and "RIO.Vector.Storable.Unsafe" module RIO.Vector.Storable ( -- * Storable vectors diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Vector/Unboxed/Partial.hs new/rio-0.1.10.0/src/RIO/Vector/Unboxed/Partial.hs --- old/rio-0.1.9.2/src/RIO/Vector/Unboxed/Partial.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Vector/Unboxed/Partial.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,3 +1,6 @@ +-- | Unboxed @Vector@ partial functions. Import as: +-- +-- > import qualified RIO.Vector.Unboxed.Partial as VU' module RIO.Vector.Unboxed.Partial ( -- * Accessors diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Vector/Unboxed/Unsafe.hs new/rio-0.1.10.0/src/RIO/Vector/Unboxed/Unsafe.hs --- old/rio-0.1.9.2/src/RIO/Vector/Unboxed/Unsafe.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Vector/Unboxed/Unsafe.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,3 +1,7 @@ +-- | Unoxed @Vector@ unsafe functions. These perform no bounds +-- checking, and may cause segmentation faults etc.! Import as: +-- +-- > import qualified RIO.Vector.Unoxed.Unsafe as VU' module RIO.Vector.Unboxed.Unsafe ( -- * Accessors diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Vector/Unboxed.hs new/rio-0.1.10.0/src/RIO/Vector/Unboxed.hs --- old/rio-0.1.9.2/src/RIO/Vector/Unboxed.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Vector/Unboxed.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,7 +1,11 @@ {-# LANGUAGE CPP #-} + -- | Unboxed @Vector@. Import as: -- -- > import qualified RIO.Vector.Unboxed as VU +-- +-- This module does not export any partial or unsafe functions. For those, see +-- "RIO.Vector.Unboxed.Partial" and "RIO.Vector.Unboxed.Unsafe" module RIO.Vector.Unboxed ( -- * Unboxed vectors diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Vector/Unsafe.hs new/rio-0.1.10.0/src/RIO/Vector/Unsafe.hs --- old/rio-0.1.9.2/src/RIO/Vector/Unsafe.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Vector/Unsafe.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,3 +1,7 @@ +-- | Generic @Vector@ interface unsafe functions. These perform no bounds +-- checking, and may cause segmentation faults etc.! Import as: +-- +-- > import qualified RIO.Vector.Unsafe as V' module RIO.Vector.Unsafe ( -- * Immutable vectors diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO/Vector.hs new/rio-0.1.10.0/src/RIO/Vector.hs --- old/rio-0.1.9.2/src/RIO/Vector.hs 2018-03-18 09:09:39.000000000 +0100 +++ new/rio-0.1.10.0/src/RIO/Vector.hs 2019-06-26 06:57:48.000000000 +0200 @@ -1,7 +1,11 @@ {-# LANGUAGE CPP #-} + -- | Generic @Vector@ interface. Import as: -- -- > import qualified RIO.Vector as V +-- +-- This module does not export any partial or unsafe functions. For those, see +-- "RIO.Vector.Partial" and "RIO.Vector.Unsafe" module RIO.Vector ( -- * Immutable vectors diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/src/RIO.hs new/rio-0.1.10.0/src/RIO.hs --- old/rio-0.1.9.2/src/RIO.hs 2019-04-11 09:22:33.000000000 +0200 +++ new/rio-0.1.10.0/src/RIO.hs 2019-06-26 06:57:48.000000000 +0200 @@ -10,6 +10,9 @@ -- > {-# LANGUAGE NoImplicitPrelude #-} -- > import RIO -- + -- Some functions not exported here can be found in "RIO.Partial": + -- @fromJust@, @read@, @toEnum@, @pred@, @succ@. + -- module RIO.Prelude , module RIO.Prelude.Types -- * The @RIO@ Monad diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/rio-0.1.9.2/test/RIO/LoggerSpec.hs new/rio-0.1.10.0/test/RIO/LoggerSpec.hs --- old/rio-0.1.9.2/test/RIO/LoggerSpec.hs 2018-07-29 10:38:08.000000000 +0200 +++ new/rio-0.1.10.0/test/RIO/LoggerSpec.hs 2019-06-26 06:57:48.000000000 +0200 @@ -24,6 +24,20 @@ logStickyDone "XYZ" builder <- readIORef ref toLazyByteString builder `shouldBe` "ABC\b\b\b \b\b\bshould appear\nABC\b\b\b \b\b\bXYZ\n" + it "stickyUnicode" $ do + (ref, options) <- logOptionsMemory + withLogFunc options $ \lf -> runRIO lf $ do + logSticky "ö" + logStickyDone "." + builder <- readIORef ref + toLazyByteString builder `shouldBe` "\195\182\b \b.\n" + it "stickyAnsiEscape" $ do + (ref, options) <- logOptionsMemory + withLogFunc options $ \lf -> runRIO lf $ do + logSticky "\ESC[31mABC\ESC[0m" + logStickyDone "." + builder <- readIORef ref + toLazyByteString builder `shouldBe` "\ESC[31mABC\ESC[0m\b\b\b \b\b\b.\n" it "setLogMinLevelIO" $ do (ref, options) <- logOptionsMemory logLevelRef <- newIORef LevelDebug
participants (1)
-
root