packages feed

shellmet 0.0.4.0 → 0.0.4.1

raw patch · 5 files changed

+28/−14 lines, 5 filesdep ~basedep ~text

Dependency ranges changed: base, text

Files

CHANGELOG.md view
@@ -3,6 +3,11 @@ `shellmet` uses [PVP Versioning][1]. The changelog is available [on GitHub][2]. +## 0.0.4.1 — Jun 13, 2022++* [#28](https://github.com/kowainik/shellmet/issues/28):+  Support GHC 9.2.+ ## 0.0.4.0 — Mar 23, 2021  * [#20](https://github.com/kowainik/shellmet/issues/20):
README.lhs view
@@ -27,6 +27,7 @@ {-# LANGUAGE OverloadedStrings #-}  import Data.Semigroup ((<>))+ import Shellmet (($|))  import qualified Data.Text as T
README.md view
@@ -27,6 +27,7 @@ {-# LANGUAGE OverloadedStrings #-}  import Data.Semigroup ((<>))+ import Shellmet (($|))  import qualified Data.Text as T
shellmet.cabal view
@@ -1,6 +1,6 @@ cabal-version:       2.4 name:                shellmet-version:             0.0.4.0+version:             0.0.4.1 synopsis:            Out of the shell solution for scripting in Haskell description:         Shellmet provides easy and convenient way to call shell commands from Haskell programs homepage:            https://github.com/kowainik/shellmet@@ -9,7 +9,7 @@ license-file:        LICENSE author:              Dmitrii Kovanikov maintainer:          Kowainik <xrom.xkov@gmail.com>-copyright:           2019-2021 Kowainik+copyright:           2019-2022 Kowainik category:            Shell, Command Line build-type:          Simple extra-doc-files:     README.md@@ -18,15 +18,16 @@                      GHC == 8.4.4                      GHC == 8.6.5                      GHC == 8.8.4-                     GHC == 8.10.4-                     GHC == 9.0.1+                     GHC == 8.10.7+                     GHC == 9.0.2+                     GHC == 9.2.3  source-repository head   type:                git   location:            https://github.com/kowainik/shellmet.git  common common-options-  build-depends:       base >= 4.10.1.0 && < 4.16+  build-depends:       base >= 4.10.1.0 && < 4.17    ghc-options:         -Wall                        -Wcompat@@ -43,6 +44,11 @@                        -Werror=missing-deriving-strategies   if impl(ghc >= 8.10)     ghc-options:       -Wunused-packages+  if impl(ghc >= 9.0)+    ghc-options:       -Winvalid-haddock+  if impl(ghc >= 9.2)+    ghc-options:       -Wredundant-bang-patterns+                       -Woperator-whitespace    default-language:    Haskell2010   default-extensions:  ConstraintKinds@@ -65,7 +71,7 @@   exposed-modules:     Shellmet    build-depends:       process ^>= 1.6.1-                     , text ^>= 1.2.3+                     , text >= 1.2.3 && < 2.1  executable readme   import:              common-options
src/Shellmet.hs view
@@ -5,7 +5,7 @@  {- | Module                  : Shellmet-Copyright               : (c) 2019-2021 Kowainik+Copyright               : (c) 2019-2022 Kowainik SPDX-License-Identifier : MPL-2.0 Maintainer              : Kowainik <xrom.xkov@gmail.com> Stability               : Stable@@ -29,7 +29,7 @@ import Control.Exception (catch) import Data.String (IsString (..)) import Data.Text (Text)-import System.Process (callCommand, readProcess, showCommandForUser)+import System.Process (callProcess, readProcess, showCommandForUser)  import qualified Data.Text as T @@ -44,9 +44,9 @@ instance (a ~ [Text], b ~ IO ()) => IsString (a -> b) where     fromString :: String -> [Text] -> IO ()     fromString cmd args = do-        let cmdStr = showCommandForUser cmd (map T.unpack args)-        putStrLn $ "⚙  " ++ cmdStr-        callCommand cmdStr+        let argStrs = map T.unpack args+        putStrLn $ "⚙  " ++ showCommandForUser cmd argStrs+        callProcess cmd argStrs     {-# INLINE fromString #-}  {- | Run shell command with given options and return stripped stdout of the@@ -68,13 +68,14 @@ -} infix 5 $^ ($^) :: FilePath -> [Text] -> IO ()-cmd $^ args = callCommand $ showCommandForUser cmd (map T.unpack args)+cmd $^ args = callProcess cmd (map T.unpack args) {-# INLINE ($^) #-}  {- | Do some IO actions when process failed with 'IOError'. ->>> "exit" ["0"] $? putStrLn "Command failed"-⚙  exit 0+>>> "echo" ["0"] $? putStrLn "Command failed"+⚙  echo 0+0  >>> "exit" ["1"] $? putStrLn "Command failed" ⚙  exit 1