shh 0.7.0.6 → 0.7.0.7
raw patch · 4 files changed
+27/−17 lines, 4 filesdep ~basedep ~template-haskellPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base, template-haskell
API changes (from Hackage documentation)
Files
- README.md +12/−7
- shh.cabal +1/−1
- src/Shh/Internal.hs +2/−2
- test/Readme.lhs +12/−7
README.md view
@@ -5,7 +5,7 @@ [](https://builds.sr.ht/~lukec/shh/nix.yml?) <details><summary>-Shh is a library to enable convinient shell-like programming in Haskell.+Shh is a library to enable convenient shell-like programming in Haskell. It works well in scripts, and from GHCi, allowing you to use GHCi as a shell. </summary> @@ -52,7 +52,7 @@ using template Haskell, as well as a runtime check to ensure they all exist on startup. - * Redirction of stdout and stderr+ * Redirection of stdout and stderr ```haskell -- Redirect stdout@@ -77,7 +77,7 @@ (echo 1 >> echo 2) |> cat ``` - * Use of Haskells concurrency primitives.+ * Use of Haskell's concurrency primitives. ```haskell race (sleep 1 >> echo "Slept for 1") (sleep 2 >> echo "Slept for 2")@@ -180,15 +180,20 @@ ## Usage -Enable Template Haskell and load the environment+Enable Template Haskell and load the environment. It is also strongly+recommended to use `ExtendedDefaultRules`. {-# LANGUAGE TemplateHaskell #-}+ {-# LANGUAGE ExtendedDefaultRules #-} $(loadEnv SearchPath) -You now have all your executables available as simple to read-Haskell functions.+You now have all your executables available as simple to read Haskell+functions. This may render the namespace unwieldy. Executables may be loaded+explicitly using instead `load ShellPath`, such as -If you want to check that all the dependenies still exist, you can use+ load SearchPath ["echo", "grep", "cat", "ls"]++If you want to check that all the dependencies still exist, you can use `missingExecutables :: IO [String]`, which will tell you if anything is missing.
shh.cabal view
@@ -1,5 +1,5 @@ name: shh-version: 0.7.0.6+version: 0.7.0.7 synopsis: Simple shell scripting from Haskell description: Provides a shell scripting environment for Haskell. It helps you use external binaries, and allows you to
src/Shh/Internal.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE BangPatterns #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-}@@ -836,8 +837,7 @@ dropLastNull :: [ByteString] -> [ByteString] dropLastNull [] = [] dropLastNull [""] = []- dropLastNull [a] = [a]- dropLastNull (a:as) = a : dropLastNull as+ dropLastNull (a : as) = a : dropLastNull as -- | Load executables from the given directories loadFromDirs :: [FilePath] -> Q [Dec]
test/Readme.lhs view
@@ -5,7 +5,7 @@ [](https://builds.sr.ht/~lukec/shh/nix.yml?) <details><summary>-Shh is a library to enable convinient shell-like programming in Haskell.+Shh is a library to enable convenient shell-like programming in Haskell. It works well in scripts, and from GHCi, allowing you to use GHCi as a shell. </summary> @@ -52,7 +52,7 @@ using template Haskell, as well as a runtime check to ensure they all exist on startup. - * Redirction of stdout and stderr+ * Redirection of stdout and stderr ```haskell -- Redirect stdout@@ -77,7 +77,7 @@ (echo 1 >> echo 2) |> cat ``` - * Use of Haskells concurrency primitives.+ * Use of Haskell's concurrency primitives. ```haskell race (sleep 1 >> echo "Slept for 1") (sleep 2 >> echo "Slept for 2")@@ -180,15 +180,20 @@ ## Usage -Enable Template Haskell and load the environment+Enable Template Haskell and load the environment. It is also strongly+recommended to use `ExtendedDefaultRules`. {-# LANGUAGE TemplateHaskell #-}+ {-# LANGUAGE ExtendedDefaultRules #-} $(loadEnv SearchPath) -You now have all your executables available as simple to read-Haskell functions.+You now have all your executables available as simple to read Haskell+functions. This may render the namespace unwieldy. Executables may be loaded+explicitly using instead `load ShellPath`, such as -If you want to check that all the dependenies still exist, you can use+ load SearchPath ["echo", "grep", "cat", "ls"]++If you want to check that all the dependencies still exist, you can use `missingExecutables :: IO [String]`, which will tell you if anything is missing.