Hello community,

here is the log from the commit of package ghc-shelly for openSUSE:Factory 
checked in at 2016-04-30 23:30:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-shelly (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-shelly.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-shelly"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-shelly/ghc-shelly.changes    2015-12-23 
08:49:24.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-shelly.new/ghc-shelly.changes       
2016-04-30 23:30:35.000000000 +0200
@@ -1,0 +2,6 @@
+Tue Apr 26 08:48:11 UTC 2016 - [email protected]
+
+- update to  1.6.6
+* add prependToPath function
+
+-------------------------------------------------------------------

Old:
----
  shelly-1.6.5.tar.gz

New:
----
  shelly-1.6.6.tar.gz

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

Other differences:
------------------
++++++ ghc-shelly.spec ++++++
--- /var/tmp/diff_new_pack.GY3LMD/_old  2016-04-30 23:30:35.000000000 +0200
+++ /var/tmp/diff_new_pack.GY3LMD/_new  2016-04-30 23:30:35.000000000 +0200
@@ -21,7 +21,7 @@
 %bcond_with tests
 
 Name:           ghc-shelly
-Version:        1.6.5
+Version:        1.6.6
 Release:        0
 Summary:        Shell-like (systems) programming in Haskell
 License:        BSD-3-Clause

++++++ shelly-1.6.5.tar.gz -> shelly-1.6.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shelly-1.6.5/ChangeLog.md 
new/shelly-1.6.6/ChangeLog.md
--- old/shelly-1.6.5/ChangeLog.md       2015-12-10 18:43:35.000000000 +0100
+++ new/shelly-1.6.6/ChangeLog.md       2016-04-21 18:31:23.000000000 +0200
@@ -1,3 +1,7 @@
+# 1.6.6
+
+* add prependToPath function
+
 # 1.6.5
 
 * expose MonadShControl
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shelly-1.6.5/shelly.cabal 
new/shelly-1.6.6/shelly.cabal
--- old/shelly-1.6.5/shelly.cabal       2015-12-10 18:17:15.000000000 +0100
+++ new/shelly-1.6.6/shelly.cabal       2016-04-21 18:30:42.000000000 +0200
@@ -1,6 +1,6 @@
 Name:       shelly
 
-Version:     1.6.5
+Version:     1.6.6
 Synopsis:    shell-like (systems) programming in Haskell
 
 Description: Shelly provides convenient systems programming in Haskell,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shelly-1.6.5/src/Shelly/Lifted.hs 
new/shelly-1.6.6/src/Shelly/Lifted.hs
--- old/shelly-1.6.5/src/Shelly/Lifted.hs       2015-12-08 00:20:05.000000000 
+0100
+++ new/shelly-1.6.6/src/Shelly/Lifted.hs       2016-04-21 18:30:42.000000000 
+0200
@@ -51,7 +51,7 @@
 
 
          -- * Modifying and querying environment.
-         , setenv, get_env, get_env_text, get_env_all, appendToPath
+         , setenv, get_env, get_env_text, get_env_all, appendToPath, 
prependToPath
 
          -- * Environment directory
          , cd, chdir, chdir_p, pwd
@@ -156,19 +156,19 @@
 instance (Monoid w, MonadSh m) => MonadSh (WriterT w m) where
     liftSh m = WriterT $ do
         a <- liftSh m
-        return (a, mempty)
+        return (a, mempty :: w)
 instance (Monoid w, MonadSh m) => MonadSh (Strict.WriterT w m) where
     liftSh m = Strict.WriterT $ do
         a <- liftSh m
-        return (a, mempty)
+        return (a, mempty :: w)
 instance (Monoid w, MonadSh m) => MonadSh (RWS.RWST r w s m) where
     liftSh m = RWS.RWST $ \_ s -> do
         a <- liftSh m
-        return (a, s, mempty)
+        return (a, s, mempty :: w)
 instance (Monoid w, MonadSh m) => MonadSh (Strict.RWST r w s m) where
     liftSh m = Strict.RWST $ \_ s -> do
         a <- liftSh m
-        return (a, s, mempty)
+        return (a, s, mempty :: w)
 
 instance MonadSh m => S.ShellCmd (m Text) where
     cmdAll = (liftSh .) . S.run
@@ -223,7 +223,7 @@
          => MonadShControl (WriterT w m) where
     newtype ShM (WriterT w m) a = WriterTShM (ShM m (a, w))
     liftShWith f =
-        WriterT $ liftM  (\x -> (x, mempty)) $ liftShWith $ \runInSh -> f $ \k 
->
+        WriterT $ liftM  (\x -> (x, mempty :: w)) $ liftShWith $ \runInSh -> f 
$ \k ->
             liftM WriterTShM $ runInSh $ runWriterT k
     restoreSh (WriterTShM m) = WriterT . restoreSh $ m
     {-# INLINE liftShWith #-}
@@ -233,7 +233,7 @@
          => MonadShControl (Strict.WriterT w m) where
     newtype ShM (Strict.WriterT w m) a = StWriterTShM (ShM m (a, w))
     liftShWith f =
-        Strict.WriterT $ liftM (\x -> (x, mempty)) $ liftShWith $ \runInSh -> 
f $ \k ->
+        Strict.WriterT $ liftM (\x -> (x, mempty :: w)) $ liftShWith $ 
\runInSh -> f $ \k ->
             liftM StWriterTShM $ runInSh $ Strict.runWriterT k
     restoreSh (StWriterTShM m) = Strict.WriterT . restoreSh $ m
     {-# INLINE liftShWith #-}
@@ -280,7 +280,7 @@
          => MonadShControl (RWS.RWST r w s m) where
     newtype ShM (RWS.RWST r w s m) a = RWSTShM (ShM m (a, s ,w))
     liftShWith f = RWS.RWST $ \r s ->
-        liftM (\x -> (x,s,mempty)) $ liftShWith $ \runInSh -> f $ \k ->
+        liftM (\x -> (x,s,mempty :: w)) $ liftShWith $ \runInSh -> f $ \k ->
             liftM RWSTShM $ runInSh $ RWS.runRWST k r s
     restoreSh (RWSTShM m) = RWS.RWST . const . const . restoreSh $ m
     {-# INLINE liftShWith #-}
@@ -290,7 +290,7 @@
          => MonadShControl (Strict.RWST r w s m) where
     newtype ShM (Strict.RWST r w s m) a = StRWSTShM (ShM m (a, s, w))
     liftShWith f = Strict.RWST $ \r s ->
-        liftM (\x -> (x,s,mempty)) $ liftShWith $ \runInSh -> f $ \k ->
+        liftM (\x -> (x,s,mempty :: w)) $ liftShWith $ \runInSh -> f $ \k ->
             liftM StRWSTShM $ runInSh $ Strict.runRWST k r s
     restoreSh (StRWSTShM m) = Strict.RWST . const . const . restoreSh $ m
     {-# INLINE liftShWith #-}
@@ -459,6 +459,9 @@
 appendToPath :: MonadSh m => FilePath -> m ()
 appendToPath = liftSh . S.appendToPath
 
+prependToPath :: MonadSh m => FilePath -> m ()
+prependToPath = liftSh . S.prependToPath
+
 get_env_all :: MonadSh m => m [(String, String)]
 get_env_all = liftSh S.get_env_all
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shelly-1.6.5/src/Shelly/Pipe.hs 
new/shelly-1.6.6/src/Shelly/Pipe.hs
--- old/shelly-1.6.5/src/Shelly/Pipe.hs 2015-09-10 19:37:45.000000000 +0200
+++ new/shelly-1.6.6/src/Shelly/Pipe.hs 2016-04-21 18:26:43.000000000 +0200
@@ -45,9 +45,9 @@
          , (-|-), lastStderr, setStdin, lastExitCode
          , command, command_, command1, command1_
          , sshPairs, sshPairs_
- 
+
          -- * Modifying and querying environment.
-         , setenv, get_env, get_env_text, get_env_def, appendToPath
+         , setenv, get_env, get_env_text, get_env_def, appendToPath, 
prependToPath
 
          -- * Environment directory
          , cd, chdir, pwd
@@ -339,6 +339,10 @@
 appendToPath :: FilePath -> Sh ()
 appendToPath = sh1 S.appendToPath
 
+-- | see 'S.prependToPath'
+prependToPath :: FilePath -> Sh ()
+prependToPath = sh1 S.prependToPath
+
 -- | see 'S.cd'
 cd :: FilePath -> Sh ()
 cd = sh1 S.cd
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/shelly-1.6.5/src/Shelly.hs 
new/shelly-1.6.6/src/Shelly.hs
--- old/shelly-1.6.5/src/Shelly.hs      2015-12-01 15:04:18.000000000 +0100
+++ new/shelly-1.6.6/src/Shelly.hs      2016-04-21 18:29:13.000000000 +0200
@@ -45,7 +45,7 @@
          , HandleInitializer, StdInit(..), initOutputHandles, initAllHandles
 
          -- * Modifying and querying environment.
-         , setenv, get_env, get_env_text, getenv, get_env_def, get_env_all, 
get_environment, appendToPath
+         , setenv, get_env, get_env_text, getenv, get_env_def, get_env_all, 
get_environment, appendToPath, prependToPath
 
          -- * Environment directory
          , cd, chdir, chdir_p, pwd
@@ -750,6 +750,14 @@
   pe <- get_env_text path_env
   setPath $ pe <> T.singleton searchPathSeparator <> tp
 
+-- | prepend the filepath to the PATH env variable
+-- similar to `appendToPath` but gives high priority to the filepath instead 
of low priority.
+prependToPath :: FilePath -> Sh ()
+prependToPath = traceAbsPath ("prependToPath: " <>) >=> \filepath -> do
+  tp <- toTextWarn filepath
+  pe <- get_env_text path_env
+  setPath $ tp <> T.singleton searchPathSeparator <> pe
+
 get_environment :: Sh [(String, String)]
 get_environment = gets sEnvironment
 {-# DEPRECATED get_environment "use get_env_all" #-}


Reply via email to