summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlukec <>2020-05-28 09:01:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2020-05-28 09:01:00 (GMT)
commit6ac4ecdf47d1c5ef76af67a7243a03c711c8714f (patch)
tree3be86609274061c3649da6ccd5396c27900dfaaa
parentdd374677b1a1dd738dad92e59b1851964821961c (diff)
version 0.7.0.80.7.0.8
-rwxr-xr-xChangeLog.md6
-rwxr-xr-xREADME.md10
-rw-r--r--shh.cabal6
-rw-r--r--src/Shh/Internal.hs4
-rw-r--r--test/Readme.lhs10
5 files changed, 27 insertions, 9 deletions
diff --git a/ChangeLog.md b/ChangeLog.md
index 879eace..4fba735 100755
--- a/ChangeLog.md
+++ b/ChangeLog.md
@@ -1,5 +1,11 @@
# Revision history for shh
+## 0.7.0.8 -- 2020-05-28
+
+* Flush std buffers before executing a process to make interaction
+ with Haskells standard IO system more predictable.
+* Various bug fixes
+
## 0.7.0.3 -- 2019-08-21
Allow optionally capturing stdout on failure exceptions
diff --git a/README.md b/README.md
index b47b32a..830b64b 100755
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
[![](https://img.shields.io/hackage/v/shh.svg?colorB=%23999&label=shh)](http://hackage.haskell.org/package/shh)
[![](https://img.shields.io/hackage/v/shh-extras.svg?colorB=%23999&label=shh-extras)](http://hackage.haskell.org/package/shh-extras)
-[![](https://builds.sr.ht/~lukec/shh/nix.yml.svg)](https://builds.sr.ht/~lukec/shh/nix.yml?)
+[![](https://builds.sr.ht/~lukec/shh/nix.yml.svg)](https://builds.sr.ht/~lukec/shh/commits/nix.yml)
<details><summary>
Shh is a library to enable convenient shell-like programming in Haskell.
@@ -171,7 +171,7 @@ currently suggested to use another library to do globbing. For example,
using the [Glob](http://hackage.haskell.org/package/Glob) package, it is
possible to do something like
- wc =<< glob "*.md"
+ wc "--" =<< glob "*.md"
Certainly more verbose than the Bash equivalent, however, also more explicit,
which is probably a good thing. If this turns out to be too cumbersome, we
@@ -180,8 +180,12 @@ explicit, and thus always more verbose than most other shells.
## Usage
+Some of the features in Shh require that you use the threaded runtime.
+Please compile with the `-threaded` flag to avoid deadlocks.
+
Enable Template Haskell and load the environment. It is also strongly
-recommended to use `ExtendedDefaultRules`.
+recommended to use `ExtendedDefaultRules`. This is especially important
+if you want to use `OverloadedStrings`.
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ExtendedDefaultRules #-}
diff --git a/shh.cabal b/shh.cabal
index 9e0cd96..5848cce 100644
--- a/shh.cabal
+++ b/shh.cabal
@@ -1,5 +1,5 @@
name: shh
-version: 0.7.0.7
+version: 0.7.0.8
synopsis: Simple shell scripting from Haskell
description: Provides a shell scripting environment for Haskell. It
helps you use external binaries, and allows you to
@@ -23,7 +23,7 @@ library
exposed-modules: Shh
, Shh.Internal
build-depends:
- base >= 4.9 && < 4.13,
+ base >= 4.9 && < 4.15,
async >= 2.2.1 && < 2.3,
bytestring,
deepseq >= 1.4.3 && < 1.5,
@@ -33,7 +33,7 @@ library
process >= 1.6.3 && < 1.7,
split >= 0.2.3 && < 0.3,
stringsearch >= 0.3.6.6 && < 0.4,
- template-haskell >= 2.13.0 && < 2.15,
+ template-haskell >= 2.13.0 && < 2.17,
containers >= 0.5.11 && < 0.7,
unix >= 2.7.2 && < 2.8,
utf8-string
diff --git a/src/Shh/Internal.hs b/src/Shh/Internal.hs
index 75d1879..858179c 100644
--- a/src/Shh/Internal.hs
+++ b/src/Shh/Internal.hs
@@ -416,6 +416,10 @@ instance Shell Proc where
-- so we ignore that corner case (see `hDup`).
runProc' :: Handle -> Handle -> Handle -> Proc a -> IO a
runProc' i o e (Proc f) = do
+ -- Flush stdout and stderr so that sequencing commands with
+ -- Haskell IO functions looks right.
+ hFlush stdout
+ hFlush stderr
r <- f i o e
-- Evaluate to WHNF to uncover any ResourceVanished exceptions
-- that may be hiding in there from `nativeProc`. These should
diff --git a/test/Readme.lhs b/test/Readme.lhs
index b47b32a..830b64b 100644
--- a/test/Readme.lhs
+++ b/test/Readme.lhs
@@ -2,7 +2,7 @@
[![](https://img.shields.io/hackage/v/shh.svg?colorB=%23999&label=shh)](http://hackage.haskell.org/package/shh)
[![](https://img.shields.io/hackage/v/shh-extras.svg?colorB=%23999&label=shh-extras)](http://hackage.haskell.org/package/shh-extras)
-[![](https://builds.sr.ht/~lukec/shh/nix.yml.svg)](https://builds.sr.ht/~lukec/shh/nix.yml?)
+[![](https://builds.sr.ht/~lukec/shh/nix.yml.svg)](https://builds.sr.ht/~lukec/shh/commits/nix.yml)
<details><summary>
Shh is a library to enable convenient shell-like programming in Haskell.
@@ -171,7 +171,7 @@ currently suggested to use another library to do globbing. For example,
using the [Glob](http://hackage.haskell.org/package/Glob) package, it is
possible to do something like
- wc =<< glob "*.md"
+ wc "--" =<< glob "*.md"
Certainly more verbose than the Bash equivalent, however, also more explicit,
which is probably a good thing. If this turns out to be too cumbersome, we
@@ -180,8 +180,12 @@ explicit, and thus always more verbose than most other shells.
## Usage
+Some of the features in Shh require that you use the threaded runtime.
+Please compile with the `-threaded` flag to avoid deadlocks.
+
Enable Template Haskell and load the environment. It is also strongly
-recommended to use `ExtendedDefaultRules`.
+recommended to use `ExtendedDefaultRules`. This is especially important
+if you want to use `OverloadedStrings`.
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE ExtendedDefaultRules #-}