Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-typed-process for 
openSUSE:Factory checked in at 2022-08-01 21:30:45
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-typed-process (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-typed-process.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-typed-process"

Mon Aug  1 21:30:45 2022 rev:19 rq:987106 version:0.2.10.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-typed-process/ghc-typed-process.changes      
2022-02-11 23:10:02.547055809 +0100
+++ 
/work/SRC/openSUSE:Factory/.ghc-typed-process.new.1533/ghc-typed-process.changes
    2022-08-01 21:31:17.821811055 +0200
@@ -1,0 +2,12 @@
+Fri Jun  3 10:42:56 UTC 2022 - Peter Simons <[email protected]>
+
+- Update typed-process to version 0.2.10.1.
+  ## 0.2.10.0
+
+  * Add `mkPipeStreamSpec`
+
+  ## 0.2.9.0
+
+  * Re-export `StdStream`
+
+-------------------------------------------------------------------

Old:
----
  typed-process-0.2.8.0.tar.gz

New:
----
  typed-process-0.2.10.1.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-typed-process.spec ++++++
--- /var/tmp/diff_new_pack.QPcTnR/_old  2022-08-01 21:31:18.601813293 +0200
+++ /var/tmp/diff_new_pack.QPcTnR/_new  2022-08-01 21:31:18.613813327 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-typed-process
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %global pkg_name typed-process
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.2.8.0
+Version:        0.2.10.1
 Release:        0
 Summary:        Run external processes, with strong typing of streams
 License:        MIT

++++++ typed-process-0.2.8.0.tar.gz -> typed-process-0.2.10.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typed-process-0.2.8.0/ChangeLog.md 
new/typed-process-0.2.10.1/ChangeLog.md
--- old/typed-process-0.2.8.0/ChangeLog.md      2001-09-09 03:46:40.000000000 
+0200
+++ new/typed-process-0.2.10.1/ChangeLog.md     2001-09-09 03:46:40.000000000 
+0200
@@ -1,5 +1,13 @@
 # ChangeLog for typed-process
 
+## 0.2.10.0
+
+* Add `mkPipeStreamSpec`
+
+## 0.2.9.0
+
+* Re-export `StdStream`
+
 ## 0.2.8.0
 
 * Re-export `ExitCode`, `ExitSuccess` and `ExitFailure`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typed-process-0.2.8.0/README.md 
new/typed-process-0.2.10.1/README.md
--- old/typed-process-0.2.8.0/README.md 2001-09-09 03:46:40.000000000 +0200
+++ new/typed-process-0.2.10.1/README.md        2001-09-09 03:46:40.000000000 
+0200
@@ -7,7 +7,7 @@
 
 This library provides the ability to launch and interact with external
 processes. It wraps around the
-[process library](https://haskell-lang.org/library/process), and
+[process library](https://hackage.haskell.org/package/process), and
 intends to improve upon it by:
 
 1. Using type variables to represent the standard streams, making them
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typed-process-0.2.8.0/src/System/Process/Typed.hs 
new/typed-process-0.2.10.1/src/System/Process/Typed.hs
--- old/typed-process-0.2.8.0/src/System/Process/Typed.hs       2001-09-09 
03:46:40.000000000 +0200
+++ new/typed-process-0.2.10.1/src/System/Process/Typed.hs      2001-09-09 
03:46:40.000000000 +0200
@@ -71,6 +71,7 @@
 
     -- ** Create your own stream spec
     , mkStreamSpec
+    , mkPipeStreamSpec
 
       -- | #launchaprocess#
 
@@ -119,6 +120,7 @@
 
       -- * Re-exports
     , ExitCode (..)
+    , P.StdStream (..)
 
       -- * Unsafe functions
     , unsafeProcessHandle
@@ -579,6 +581,9 @@
 -- * Returns the actual stream value @a@, as well as a cleanup
 -- function to be run when calling 'stopProcess'.
 --
+-- If making a 'StreamSpec' with 'P.CreatePipe', prefer 'mkPipeStreamSpec',
+-- which encodes the invariant that a 'Handle' is created.
+--
 -- @since 0.1.0.0
 mkStreamSpec :: P.StdStream
              -- ^
@@ -587,6 +592,25 @@
              -> StreamSpec streamType a
 mkStreamSpec ss f = mkManagedStreamSpec ($ ss) f
 
+-- | Create a new 'P.CreatePipe' 'StreamSpec' from the given function.
+-- This function:
+--
+-- * Takes as input the @Handle@ returned by the 'P.createProcess' function.
+-- See 'P.createProcess' for more details.
+--
+-- * Returns the actual stream value @a@, as well as a cleanup
+-- function to be run when calling 'stopProcess'.
+--
+-- @since 0.2.10.0
+mkPipeStreamSpec :: (ProcessConfig () () () -> Handle -> IO (a, IO ()))
+                 -- ^
+                 -> StreamSpec streamType a
+                 -- ^
+mkPipeStreamSpec f = mkStreamSpec P.CreatePipe $ \pc mh ->
+    case mh of
+        Just h -> f pc h
+        Nothing -> error "Invariant violation: making StreamSpec with 
CreatePipe unexpectedly did not return a Handle"
+
 -- | Create a new 'StreamSpec' from a function that accepts a
 -- 'P.StdStream' and a helper function.  This function is the same as
 -- the helper in 'mkStreamSpec'
@@ -602,7 +626,7 @@
 --
 -- @since 0.1.0.0
 inherit :: StreamSpec anyStreamType ()
-inherit = mkStreamSpec P.Inherit (\_ Nothing -> pure ((), return ()))
+inherit = mkStreamSpec P.Inherit (\_ _ -> pure ((), return ()))
 
 -- | A stream spec which is empty when used for for input and discards
 -- output.  Note this requires your platform's null device to be
@@ -627,9 +651,9 @@
 -- @since 0.1.0.0
 closed :: StreamSpec anyStreamType ()
 #if MIN_VERSION_process(1, 4, 0)
-closed = mkStreamSpec P.NoStream (\_ Nothing -> pure ((), return ()))
+closed = mkStreamSpec P.NoStream (\_ _ -> pure ((), return ()))
 #else
-closed = mkStreamSpec P.CreatePipe (\_ (Just h) -> ((), return ()) <$ hClose h)
+closed = mkPipeStreamSpec (\_ h -> ((), return ()) <$ hClose h)
 #endif
 
 -- | An input stream spec which sets the input to the given
@@ -638,7 +662,7 @@
 --
 -- @since 0.1.0.0
 byteStringInput :: L.ByteString -> StreamSpec 'STInput ()
-byteStringInput lbs = mkStreamSpec P.CreatePipe $ \_ (Just h) -> do
+byteStringInput lbs = mkPipeStreamSpec $ \_ h -> do
     void $ async $ do
         L.hPut h lbs
         hClose h
@@ -658,7 +682,7 @@
 --
 -- @since 0.1.0.0
 byteStringOutput :: StreamSpec 'STOutput (STM L.ByteString)
-byteStringOutput = mkStreamSpec P.CreatePipe $ \pc (Just h) -> 
byteStringFromHandle pc h
+byteStringOutput = mkPipeStreamSpec $ \pc h -> byteStringFromHandle pc h
 
 -- | Helper function (not exposed) for both 'byteStringOutput' and
 -- 'withProcessInterleave'. This will consume all of the output from
@@ -689,7 +713,7 @@
 --
 -- @since 0.1.0.0
 createPipe :: StreamSpec anyStreamType Handle
-createPipe = mkStreamSpec P.CreatePipe $ \_ (Just h) -> return (h, hClose h)
+createPipe = mkPipeStreamSpec $ \_ h -> return (h, hClose h)
 
 -- | Use the provided 'Handle' for the child process, and when the
 -- process exits, do /not/ close it. This is useful if, for example,
@@ -698,7 +722,7 @@
 --
 -- @since 0.1.0.0
 useHandleOpen :: Handle -> StreamSpec anyStreamType ()
-useHandleOpen h = mkStreamSpec (P.UseHandle h) $ \_ Nothing -> return ((), 
return ())
+useHandleOpen h = mkStreamSpec (P.UseHandle h) $ \_ _ -> return ((), return ())
 
 -- | Use the provided 'Handle' for the child process, and when the
 -- process exits, close it. If you have no reason to keep the 'Handle'
@@ -706,7 +730,7 @@
 --
 -- @since 0.1.0.0
 useHandleClose :: Handle -> StreamSpec anyStreamType ()
-useHandleClose h = mkStreamSpec (P.UseHandle h) $ \_ Nothing -> return ((), 
hClose h)
+useHandleClose h = mkStreamSpec (P.UseHandle h) $ \_ _ -> return ((), hClose h)
 
 -- | Launch a process based on the given 'ProcessConfig'. You should
 -- ensure that you call 'stopProcess' on the result. It's usually
@@ -1058,7 +1082,7 @@
         -- Use the writer end of the pipe for both stdout and stderr. For
         -- the stdout half, use byteStringFromHandle to read the data into
         -- a lazy ByteString in memory.
-        let pc' = setStdout (mkStreamSpec (P.UseHandle writeEnd) (\pc'' 
Nothing -> byteStringFromHandle pc'' readEnd))
+        let pc' = setStdout (mkStreamSpec (P.UseHandle writeEnd) (\pc'' _ -> 
byteStringFromHandle pc'' readEnd))
                 $ setStderr (useHandleOpen writeEnd)
                   pc
         withProcess pc' $ \p -> do
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/typed-process-0.2.8.0/typed-process.cabal 
new/typed-process-0.2.10.1/typed-process.cabal
--- old/typed-process-0.2.8.0/typed-process.cabal       2001-09-09 
03:46:40.000000000 +0200
+++ new/typed-process-0.2.10.1/typed-process.cabal      2001-09-09 
03:46:40.000000000 +0200
@@ -5,7 +5,7 @@
 -- see: https://github.com/sol/hpack
 
 name:           typed-process
-version:        0.2.8.0
+version:        0.2.10.1
 synopsis:       Run external processes, with strong typing of streams
 description:    Please see the tutorial at 
<https://github.com/fpco/typed-process#readme>
 category:       System
@@ -33,7 +33,7 @@
   hs-source-dirs:
       src
   build-depends:
-      async
+      async >=2.0
     , base >=4.12 && <5
     , bytestring
     , process >=1.2
@@ -54,7 +54,7 @@
       test
   ghc-options: -threaded -rtsopts -with-rtsopts=-N
   build-depends:
-      async
+      async >=2.0
     , base >=4.12 && <5
     , base64-bytestring
     , bytestring
@@ -76,7 +76,7 @@
   hs-source-dirs:
       test
   build-depends:
-      async
+      async >=2.0
     , base >=4.12 && <5
     , base64-bytestring
     , bytestring

Reply via email to