-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | shell-like (systems) programming in Haskell
--   
--   Shelly provides convenient systems programming in Haskell, similar in
--   spirit to POSIX shells. Shelly:
--   
--   
--   
- is aimed at convenience and getting things done rather than being
--   a demonstration of elegance.
--   
- has detailed and useful error messages
--   
- maintains its own environment, making it thread-safe.
--   
- is modern, using Text filepath/directory
--   
--   
--   Shelly is originally forked from the Shellish package.
--   
--   See the shelly-extra package for additional functionality.
--   
--   An overview is available in the README:
--   https://github.com/yesodweb/Shelly.hs/blob/master/README.md
@package shelly
@version 1.9.0

-- | A module for shell-like programming in Haskell. Shelly's focus is
--   entirely on ease of use for those coming from shell scripting.
--   However, it also tries to use modern libraries and techniques to keep
--   things efficient.
--   
--   The functionality provided by this module is (unlike standard Haskell
--   filesystem functionality) thread-safe: each Sh maintains its own
--   environment and its own working directory.
--   
--   Recommended usage includes putting the following at the top of your
--   program, otherwise you will likely need either type annotations or
--   type conversions
--   
--   
--   {-# LANGUAGE OverloadedStrings #-}
--   {-# LANGUAGE ExtendedDefaultRules #-}
--   {-# OPTIONS_GHC -fno-warn-type-defaults #-}
--   import Shelly
--   import qualified Data.Text as T
--   default (T.Text)
--   
module Shelly
data Sh a

-- | ShIO is Deprecated in favor of Sh, which is easier to type.

-- | Deprecated: Use Sh instead of ShIO
type ShIO a = Sh a

-- | Enter a Sh from (Monad)IO. The environment and working directories are
--   inherited from the current process-wide values. Any subsequent changes
--   in processwide working directory or environment are not reflected in
--   the running Sh.
shelly :: MonadIO m => Sh a -> m a

-- | Deprecated now, just use shelly, whose default has been
--   changed. Using this entry point does not create a .shelly
--   directory in the case of failure. Instead it logs directly into the
--   standard error stream (stderr).

-- | Deprecated: Just use shelly. The default settings have changed
shellyNoDir :: MonadIO m => Sh a -> m a

-- | Using this entry point creates a .shelly directory in the
--   case of failure where errors are recorded.
shellyFailDir :: MonadIO m => Sh a -> m a

-- | spawn an asynchronous action with a copy of the current state
asyncSh :: Sh a -> Sh (Async a)

-- | Enter a sub-Sh that inherits the environment The original state will
--   be restored when the sub-Sh completes. Exceptions are propagated
--   normally.
sub :: Sh a -> Sh a

-- | Create a sub-Sh in which external command outputs are not echoed and
--   commands are not printed. See sub.
silently :: Sh a -> Sh a

-- | Create a sub-Sh in which external command outputs are echoed and
--   Executed commands are printed See sub.
verbosely :: Sh a -> Sh a

-- | Create a sub-Sh with shell character escaping on or off. Defaults to
--   True.
--   
--   Setting to False allows for shell wildcard such as * to be
--   expanded by the shell along with any other special shell characters.
--   As a side-effect, setting to False causes changes to
--   PATH to be ignored: see the run documentation.
escaping :: Bool -> Sh a -> Sh a

-- | Create a sub-Sh with stdout printing on or off Defaults to True.
print_stdout :: Bool -> Sh a -> Sh a

-- | Create a sub-Sh with stderr printing on or off Defaults to True.
print_stderr :: Bool -> Sh a -> Sh a

-- | Create a sub-Sh with command echoing on or off Defaults to False, set
--   to True by verbosely
print_commands :: Bool -> Sh a -> Sh a

-- | When running an external command, apply the given initializers to the
--   specified handles for that command. This can for example be used to
--   change the encoding of the handles or set them into binary mode.
onCommandHandles :: StdInit -> Sh a -> Sh a

-- | Create a sub-Sh where commands are not traced Defaults to True. You
--   should only set to False temporarily for very specific reasons
tracing :: Bool -> Sh a -> Sh a

-- | named after bash -e errexit. Defaults to True. When
--   True, throw an exception on a non-zero exit code. When
--   False, ignore a non-zero exit code. Not recommended to set to
--   False unless you are specifically checking the error code
--   with lastExitCode.
errExit :: Bool -> Sh a -> Sh a

-- | Create a sub-Sh in which stdout is sent to the user-defined logger.
--   When running with silently the given log will not be called for
--   any output. Likewise the log will also not be called for output from
--   run_ and bash_ commands.
log_stdout_with :: (Text -> IO ()) -> Sh a -> Sh a

-- | Create a sub-Sh in which stderr is sent to the user-defined logger.
--   When running with silently the given log will not be called for
--   any output. However, unlike log_stdout_with the log will be
--   called for output from run_ and bash_ commands.
log_stderr_with :: (Text -> IO ()) -> Sh a -> Sh a

-- | Execute an external command. Takes the command name and arguments.
--   
--   You may prefer using cmd instead, which is a variadic argument
--   version of this function.
--   
--   stdout and stderr are collected. The stdout is
--   returned as a result of run, and complete stderr output is
--   available after the fact using lastStderr
--   
--   All of the stdout output will be loaded into memory. You can avoid
--   this if you don't need stdout by using run_, If you want to
--   avoid the memory and need to process the output then use
--   runFoldLines or runHandle or runHandles.
--   
--   By default shell characters are escaped and the command name is a name
--   of a program that can be found via PATH. Shelly will look
--   through the PATH itself to find the command.
--   
--   When escaping is set to False, shell characters are
--   allowed. Since there is no longer a guarantee that a single program
--   name is given, Shelly cannot look in the PATH for it. a
--   PATH modified by setenv is not taken into account when
--   finding the exe name. Instead the original Haskell program
--   PATH is used. On a Posix system the env command can
--   be used to make the setenv PATH used when escaping is
--   set to False. env echo hello instead of echo hello
run :: FilePath -> [Text] -> Sh Text

-- | the same as run, but return () instead of the stdout
--   content stdout will be read and discarded line-by-line
run_ :: FilePath -> [Text] -> Sh ()

-- | used by run. fold over stdout line-by-line as it is read to
--   avoid keeping it in memory stderr is still being placed in memory
--   under the assumption it is always relatively small
runFoldLines :: a -> FoldCallback a -> FilePath -> [Text] -> Sh a

-- | variadic argument version of run. Please see the documenation
--   for run.
--   
--   The syntax is more convenient, but more importantly it also allows the
--   use of a FilePath as a command argument. So an argument can be a Text
--   or a FilePath without manual conversions. a FilePath is automatically
--   converted to Text with toTextIgnore.
--   
--   Convenient usage of cmd requires the following:
--   
--   
--   {-# LANGUAGE OverloadedStrings #-}
--   {-# LANGUAGE ExtendedDefaultRules #-}
--   {-# OPTIONS_GHC -fno-warn-type-defaults #-}
--   import Shelly
--   import qualified Data.Text as T
--   default (T.Text)
--   
cmd :: ShellCmd result => FilePath -> result
type FoldCallback a = (a -> Text -> a)

-- | Like run, but it invokes the user-requested program with
--   _bash_.
bash :: FilePath -> [Text] -> Sh Text
bash_ :: FilePath -> [Text] -> Sh ()

-- | Use this with bash to set _pipefail_
--   
--   
--   bashPipeFail $ bash "echo foo | echo"
--   
bashPipeFail :: (FilePath -> [Text] -> Sh a) -> FilePath -> [Text] -> Sh a

-- | Pipe operator. set the stdout the first command as the stdin of the
--   second. This does not create a shell-level pipe, but hopefully it will
--   in the future. To create a shell level pipe you can set escaping
--   False and use a pipe | character in a command.
(-|-) :: Sh Text -> Sh b -> Sh b

-- | The output of last external command. See run.
lastStderr :: Sh Text

-- | set the stdin to be used and cleared by the next run.
setStdin :: Text -> Sh ()

-- | The exit code from the last command. Unless you set errExit to
--   False you won't get a chance to use this: a non-zero exit code will
--   throw an exception.
lastExitCode :: Sh Int

-- | bind some arguments to run for re-use. Example:
--   
--   
--   monit = command "monit" ["-c", "monitrc"]
--   monit ["stop", "program"]
--   
command :: FilePath -> [Text] -> [Text] -> Sh Text

-- | bind some arguments to run_ for re-use. Example:
--   
--   
--   monit_ = command_ "monit" ["-c", "monitrc"]
--   monit_ ["stop", "program"]
--   
command_ :: FilePath -> [Text] -> [Text] -> Sh ()

-- | bind some arguments to run for re-use, and require 1 argument.
--   Example:
--   
--   
--   git = command1 "git" []
--   git "pull" ["origin", "master"]
--   
command1 :: FilePath -> [Text] -> Text -> [Text] -> Sh Text

-- | bind some arguments to run_ for re-use, and require 1 argument.
--   Example:
--   
--   
--   git_ = command1_ "git" []
--   git "pull" ["origin", "master"]
--   
command1_ :: FilePath -> [Text] -> Text -> [Text] -> Sh ()

-- | run commands over SSH. An ssh executable is expected in your path.
--   Commands are in the same form as run, but given as pairs
--   
--   
--   sshPairs "server-name" [("cd", "dir"), ("rm",["-r","dir2"])]
--   
--   
--   This interface is crude, but it works for now.
--   
--   Please note this sets escaping to False, and the remote
--   commands are quoted with single quotes, in a way such that the remote
--   commands will see the literal values you passed, this means that no
--   variable expansion and alike will done on either the local shell or
--   the remote shell, and that if there are a single or double quotes in
--   your arguments, they need not to be quoted manually.
--   
--   Internally the list of commands are combined with the string
--   && before given to ssh.
sshPairs :: Text -> [(FilePath, [Text])] -> Sh Text

-- | Same as sshPairs, but combines commands with the string
--   &, so they will be started in parallell.
sshPairsPar :: Text -> [(FilePath, [Text])] -> Sh Text

-- | same as sshPairs, but returns ()
sshPairs_ :: Text -> [(FilePath, [Text])] -> Sh ()

-- | same as sshPairsP, but returns ()
sshPairsPar_ :: Text -> [(FilePath, [Text])] -> Sh ()

-- | Like sshPairs, but allows for arguments to the call to ssh.
sshPairsWithOptions :: Text -> [Text] -> [(FilePath, [Text])] -> Sh Text
sshCommandText :: [(FilePath, [Text])] -> SshMode -> Text
data SshMode
ParSsh :: SshMode
SeqSsh :: SshMode

-- | For the variadic function cmd
--   
--   partially applied variadic functions require type signatures
class ShellCmd t
cmdAll :: ShellCmd t => FilePath -> [Text] -> t

-- | Argument converter for the variadic argument version of run
--   called cmd. Useful for a type signature of a function that uses
--   cmd
class CmdArg a
toTextArg :: CmdArg a => a -> Text

-- | Similar to run but gives the raw stdout handle in a callback.
--   If you want even more control, use runHandles.
runHandle :: FilePath -> [Text] -> (Handle -> Sh a) -> Sh a

-- | Similar to run but gives direct access to all input and output
--   handles.
--   
--   Be careful when using the optional input handles. If you specify
--   Inherit for a handle then attempting to access the handle in your
--   callback is an error
runHandles :: FilePath -> [Text] -> [StdHandle] -> (Handle -> Handle -> Handle -> Sh a) -> Sh a

-- | Transfer from one handle to another For example, send contents of a
--   process output to stdout. does not close the write handle.
--   
--   Also, return the complete contents being streamed line by line.
transferLinesAndCombine :: Handle -> (Text -> IO ()) -> IO Text

-- | Transfer from one handle to another For example, send contents of a
--   process output to stdout. does not close the write handle.
--   
--   Also, fold over the contents being streamed line by line
transferFoldHandleLines :: a -> FoldCallback a -> Handle -> (Text -> IO ()) -> IO a
data StdHandle
InHandle :: StdStream -> StdHandle
OutHandle :: StdStream -> StdHandle
ErrorHandle :: StdStream -> StdHandle
data StdStream
Inherit :: StdStream
UseHandle :: Handle -> StdStream
CreatePipe :: StdStream
NoStream :: StdStream

-- | Initialize a handle before using it
type HandleInitializer = Handle -> IO ()

-- | A collection of initializers for the three standard process handles
data StdInit
StdInit :: HandleInitializer -> HandleInitializer -> HandleInitializer -> StdInit
[inInit] :: StdInit -> HandleInitializer
[outInit] :: StdInit -> HandleInitializer
[errInit] :: StdInit -> HandleInitializer

-- | Apply a single initializer to the two output process handles (stdout
--   and stderr)
initOutputHandles :: HandleInitializer -> StdInit

-- | Apply a single initializer to all three standard process handles
--   (stdin, stdout and stderr)
initAllHandles :: HandleInitializer -> StdInit

-- | Set an environment variable. The environment is maintained in Sh
--   internally, and is passed to any external commands to be executed.
setenv :: Text -> Text -> Sh ()

-- | Fetch the current value of an environment variable. if non-existant or
--   empty text, will be Nothing
get_env :: Text -> Sh (Maybe Text)

-- | Fetch the current value of an environment variable. Both empty and
--   non-existent variables give empty string as a result.
get_env_text :: Text -> Sh Text

-- | deprecated

-- | Deprecated: use get_env or get_env_text
getenv :: Text -> Sh Text

-- | Fetch the current value of an environment variable. Both empty and
--   non-existent variables give the default Text value as a result

-- | Deprecated: use fromMaybe DEFAULT get_env
get_env_def :: Text -> Text -> Sh Text

-- | get the full environment
get_env_all :: Sh [(String, String)]

-- | Deprecated: use get_env_all
get_environment :: Sh [(String, String)]

-- | add the filepath onto the PATH env variable
appendToPath :: FilePath -> Sh ()

-- | 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 ()

-- | Change current working directory of Sh. This does *not* change the
--   working directory of the process we are running it. Instead, Sh keeps
--   track of its own working directory and builds absolute paths
--   internally instead of passing down relative paths.
cd :: FilePath -> Sh ()

-- | cd, execute a Sh action in the new directory and then pop back
--   to the original directory
chdir :: FilePath -> Sh a -> Sh a

-- | chdir, but first create the directory if it does not exit
chdir_p :: FilePath -> Sh a -> Sh a

-- | Obtain the current (Sh) working directory.
pwd :: Sh FilePath

-- | Echo text to standard (error, when using _err variants) output. The _n
--   variants do not print a final newline.
echo :: Text -> Sh ()

-- | Echo text to standard (error, when using _err variants) output. The _n
--   variants do not print a final newline.
echo_n :: Text -> Sh ()

-- | Echo text to standard (error, when using _err variants) output. The _n
--   variants do not print a final newline.
echo_err :: Text -> Sh ()

-- | Echo text to standard (error, when using _err variants) output. The _n
--   variants do not print a final newline.
echo_n_err :: Text -> Sh ()

-- | a print lifted into Sh
inspect :: Show s => s -> Sh ()

-- | a print lifted into Sh using stderr
inspect_err :: Show s => s -> Sh ()

-- | same as trace, but use it combinator style
tag :: Sh a -> Text -> Sh a

-- | internally log what occurred. Log will be re-played on failure.
trace :: Text -> Sh ()
show_command :: FilePath -> [Text] -> Text

-- | List directory contents. Does *not* include "." and "..", but it does
--   include (other) hidden files.
ls :: FilePath -> Sh [FilePath]

-- | Get back [Text] instead of [FilePath]
lsT :: FilePath -> Sh [Text]

-- | Does a path point to an existing filesystem object?
test_e :: FilePath -> Sh Bool

-- | Does a path point to an existing file?
test_f :: FilePath -> Sh Bool

-- | Does a path point to an existing directory?
test_d :: FilePath -> Sh Bool

-- | Does a path point to a symlink?
test_s :: FilePath -> Sh Bool

-- | Test that a file is in the PATH and also executable
test_px :: FilePath -> Sh Bool

-- | Get a full path to an executable by looking at the PATH
--   environement variable. Windows normally looks in additional places
--   besides the PATH: this does not duplicate that behavior.
which :: FilePath -> Sh (Maybe FilePath)

-- | Make a relative path absolute by combining with the working directory.
--   An absolute path is returned as is. To create a relative path, use
--   relPath.
absPath :: FilePath -> Sh FilePath

-- | uses System.FilePath, but can automatically convert a Text
(</>) :: (ToFilePath filepath1, ToFilePath filepath2) => filepath1 -> filepath2 -> FilePath

-- | uses System.FilePath, but can automatically convert a Text
(<.>) :: ToFilePath filepath => filepath -> Text -> FilePath

-- | makes an absolute path. Like canonicalize, but on an exception
--   returns absPath
canonic :: FilePath -> Sh FilePath

-- | Obtain a (reasonably) canonic file path to a filesystem object. Based
--   on "canonicalizePath" in system-fileio.
canonicalize :: FilePath -> Sh FilePath

-- | Makes a relative path relative to the current Sh working directory. An
--   absolute path is returned as is. To create an absolute path, use
--   absPath
relPath :: FilePath -> Sh FilePath

-- | make the second path relative to the first Uses stripPrefix,
--   but will canonicalize the paths if necessary
relativeTo :: FilePath -> FilePath -> Sh FilePath

-- | deprecated

-- | Deprecated: use absPath, canonic, or relPath instead
path :: FilePath -> Sh FilePath

-- | flipped hasExtension for Text
hasExt :: Text -> FilePath -> Bool

-- | Move a file. The second path could be a directory, in which case the
--   original file is moved into that directory. wraps directory
--   renameFile, which may not work across FS boundaries
mv :: FilePath -> FilePath -> Sh ()

-- | Remove a file. Does fail if the file does not exist (use rm_f
--   instead) or is not a file.
rm :: FilePath -> Sh ()

-- | Remove a file. Does not fail if the file does not exist. Does fail if
--   the file is not a file.
rm_f :: FilePath -> Sh ()

-- | A swiss army cannon for removing things. Actually this goes farther
--   than a normal rm -rf, as it will circumvent permission problems for
--   the files we own. Use carefully. Uses removeDirectoryRecursive
rm_rf :: FilePath -> Sh ()

-- | Copy a file. The second path could be a directory, in which case the
--   original file name is used, in that directory.
cp :: FilePath -> FilePath -> Sh ()

-- | Copy a file, or a directory recursively. uses cp
cp_r :: FilePath -> FilePath -> Sh ()

-- | Create a new directory (fails if the directory exists).
mkdir :: FilePath -> Sh ()

-- | Create a new directory, including parents (succeeds if the directory
--   already exists).
mkdir_p :: FilePath -> Sh ()

-- | Create a new directory tree. You can describe a bunch of directories
--   as a tree and this function will create all subdirectories. An
--   example:
--   
--   
--   exec = mkTree $
--             "package" # [
--                  "src" # [
--                      "Data" # leaves ["Tree", "List", "Set", "Map"]
--                  ],
--                  "test" # leaves ["QuickCheck", "HUnit"],
--                  "dist/doc/html" # []
--              ]
--           where (#) = Node
--                 leaves = map (# [])
--   
mkdirTree :: Tree FilePath -> Sh ()
readfile :: FilePath -> Sh Text

-- | wraps ByteSting readFile
readBinary :: FilePath -> Sh ByteString

-- | Write a Text to a file.
writefile :: FilePath -> Text -> Sh ()
writeBinary :: FilePath -> ByteString -> Sh ()

-- | Append a Text to a file.
appendfile :: FilePath -> Text -> Sh ()

-- | Update a file, creating (a blank file) if it does not exist.
touchfile :: FilePath -> Sh ()

-- | Create a temporary directory and pass it as a parameter to a Sh
--   computation. The directory is nuked afterwards.
withTmpDir :: (FilePath -> Sh a) -> Sh a

-- | exit 0 means no errors, all other codes are error conditions
exit :: Int -> Sh a

-- | echo a message and exit with status 1
errorExit :: Text -> Sh a

-- | for exiting with status > 0 without printing debug information
quietExit :: Int -> Sh a

-- | fail that takes a Text
terror :: Text -> Sh a
bracket_sh :: Sh a -> (a -> Sh b) -> (a -> Sh c) -> Sh c

-- | A helper to catch any exception (same as ... catch (e ::
--   SomeException) -> ...).
catchany :: IO a -> (SomeException -> IO a) -> IO a

-- | Same as a normal catch but specialized for the Sh monad.
catch_sh :: Exception e => Sh a -> (e -> Sh a) -> Sh a

-- | Same as a normal handle but specialized for the Sh monad.
handle_sh :: Exception e => (e -> Sh a) -> Sh a -> Sh a

-- | Handle any exception in the Sh monad.
handleany_sh :: (SomeException -> Sh a) -> Sh a -> Sh a

-- | Same as a normal finally but specialized for the Sh
--   monad.
finally_sh :: Sh a -> Sh b -> Sh a

-- | You need to wrap exception handlers with this when using
--   catches_sh.
data ShellyHandler a
ShellyHandler :: (e -> Sh a) -> ShellyHandler a

-- | Same as a normal catches, but specialized for the Sh
--   monad.
catches_sh :: Sh a -> [ShellyHandler a] -> Sh a

-- | Catch any exception in the Sh monad.
catchany_sh :: Sh a -> (SomeException -> Sh a) -> Sh a

-- | Shelly's wrapper around exceptions thrown in its monad
data ReThrownException e
ReThrownException :: e -> String -> ReThrownException e
data RunFailed
RunFailed :: FilePath -> [Text] -> Int -> Text -> RunFailed

-- | silently uses the Right or Left value of
--   "Filesystem.Path.CurrentOS.toText"
toTextIgnore :: FilePath -> Text
toTextWarn :: FilePath -> Sh Text

-- | Convert Text to a FilePath-
fromText :: Text -> FilePath

-- | A monadic-conditional version of the "when" guard.
whenM :: Monad m => m Bool -> m () -> m ()

-- | A monadic-conditional version of the unless guard.
unlessM :: Monad m => m Bool -> m () -> m ()

-- | Run a Sh computation and collect timing information. The value
--   returned is the amount of _real_ time spent running the computation in
--   seconds, as measured by the system clock. The precision is determined
--   by the resolution of getCurrentTime.
time :: Sh a -> Sh (Double, a)

-- | threadDelay wrapper that uses seconds
sleep :: Int -> Sh ()
liftIO :: MonadIO m => IO a -> m a
when :: Applicative f => Bool -> f () -> f ()
unless :: Applicative f => Bool -> f () -> f ()
type FilePath = String
(<$>) :: Functor f => (a -> b) -> f a -> f b
get :: Sh State
put :: State -> Sh ()

-- | List directory recursively (like the POSIX utility "find"). listing is
--   relative if the path given is relative. If you want to filter out some
--   results or fold over them you can do that with the returned files. A
--   more efficient approach is to use one of the other find functions.
find :: FilePath -> Sh [FilePath]

-- | find that filters the found files as it finds. Files must
--   satisfy the given filter to be returned in the result.
findWhen :: (FilePath -> Sh Bool) -> FilePath -> Sh [FilePath]

-- | Fold an arbitrary folding function over files froma a find.
--   Like findWhen but use a more general fold rather than a filter.
findFold :: (a -> FilePath -> Sh a) -> a -> FilePath -> Sh a

-- | find that filters out directories as it finds Filtering out
--   directories can make a find much more efficient by avoiding entire
--   trees of files.
findDirFilter :: (FilePath -> Sh Bool) -> FilePath -> Sh [FilePath]

-- | similar findWhen, but also filter out directories
--   Alternatively, similar to findDirFilter, but also filter out
--   files Filtering out directories makes the find much more efficient
findDirFilterWhen :: (FilePath -> Sh Bool) -> (FilePath -> Sh Bool) -> FilePath -> Sh [FilePath]

-- | like findDirFilterWhen but use a folding function rather than a
--   filter The most general finder: you likely want a more specific one
findFoldDirFilter :: (a -> FilePath -> Sh a) -> a -> (FilePath -> Sh Bool) -> FilePath -> Sh a

-- | find-command follows symbolic links. Defaults to
--   False. When True, follow symbolic links. When
--   False, never follow symbolic links.
followSymlink :: Bool -> Sh a -> Sh a
instance GHC.Show.Show Shelly.QuietExit
instance GHC.Exception.Type.Exception e => GHC.Exception.Type.Exception (Shelly.ReThrownException e)
instance GHC.Exception.Type.Exception e => GHC.Show.Show (Shelly.ReThrownException e)
instance GHC.Exception.Type.Exception Shelly.QuietExit
instance GHC.Show.Show Shelly.RunFailed
instance GHC.Exception.Type.Exception Shelly.RunFailed
instance Shelly.ToFilePath GHC.IO.FilePath
instance Shelly.ToFilePath Data.Text.Internal.Text
instance Shelly.ShellCmd (Shelly.Base.Sh Data.Text.Internal.Text)
instance (s GHC.Types.~ Data.Text.Internal.Text, GHC.Show.Show s) => Shelly.ShellCmd (Shelly.Base.Sh s)
instance Shelly.ShellCmd (Shelly.Base.Sh ())
instance (Shelly.CmdArg arg, Shelly.ShellCmd result) => Shelly.ShellCmd (arg -> result)
instance (Shelly.CmdArg arg, Shelly.ShellCmd result) => Shelly.ShellCmd ([arg] -> result)
instance Shelly.CmdArg Data.Text.Internal.Text
instance Shelly.CmdArg GHC.Base.String

-- | A module for shell-like programming in Haskell. Shelly's focus is
--   entirely on ease of use for those coming from shell scripting.
--   However, it also tries to use modern libraries and techniques to keep
--   things efficient.
--   
--   The functionality provided by this module is (unlike standard Haskell
--   filesystem functionality) thread-safe: each Sh maintains its own
--   environment and its own working directory.
--   
--   Recommended usage includes putting the following at the top of your
--   program, otherwise you will likely need either type annotations or
--   type conversions
--   
--   
--   {-# LANGUAGE OverloadedStrings #-}
--   {-# LANGUAGE ExtendedDefaultRules #-}
--   {-# OPTIONS_GHC -fno-warn-type-defaults #-}
--   import Shelly
--   import qualified Data.Text as T
--   default (T.Text)
--   
module Shelly.Lifted
class Monad m => MonadSh m
liftSh :: MonadSh m => Sh a -> m a
class Monad m => MonadShControl m where {
    data family ShM m a :: *;
}
liftShWith :: MonadShControl m => ((forall x. m x -> Sh (ShM m x)) -> Sh a) -> m a
restoreSh :: MonadShControl m => ShM m a -> m a
data Sh a

-- | ShIO is Deprecated in favor of Sh, which is easier to type.

-- | Deprecated: Use Sh instead of ShIO
type ShIO a = Sh a

-- | Enter a Sh from (Monad)IO. The environment and working directories are
--   inherited from the current process-wide values. Any subsequent changes
--   in processwide working directory or environment are not reflected in
--   the running Sh.
shelly :: MonadIO m => Sh a -> m a

-- | Deprecated now, just use shelly, whose default has been
--   changed. Using this entry point does not create a .shelly
--   directory in the case of failure. Instead it logs directly into the
--   standard error stream (stderr).

-- | Deprecated: Just use shelly. The default settings have changed
shellyNoDir :: MonadIO m => Sh a -> m a

-- | Using this entry point creates a .shelly directory in the
--   case of failure where errors are recorded.
shellyFailDir :: MonadIO m => Sh a -> m a
sub :: MonadShControl m => m a -> m a
silently :: MonadShControl m => m a -> m a
verbosely :: MonadShControl m => m a -> m a
escaping :: MonadShControl m => Bool -> m a -> m a
print_stdout :: MonadShControl m => Bool -> m a -> m a
print_stderr :: MonadShControl m => Bool -> m a -> m a
print_commands :: MonadShControl m => Bool -> m a -> m a
tracing :: MonadShControl m => Bool -> m a -> m a
errExit :: MonadShControl m => Bool -> m a -> m a
log_stdout_with :: MonadShControl m => (Text -> IO ()) -> m a -> m a
log_stderr_with :: MonadShControl m => (Text -> IO ()) -> m a -> m a
run :: MonadSh m => FilePath -> [Text] -> m Text
run_ :: MonadSh m => FilePath -> [Text] -> m ()
runFoldLines :: MonadSh m => a -> FoldCallback a -> FilePath -> [Text] -> m a

-- | variadic argument version of run. Please see the documenation
--   for run.
--   
--   The syntax is more convenient, but more importantly it also allows the
--   use of a FilePath as a command argument. So an argument can be a Text
--   or a FilePath without manual conversions. a FilePath is automatically
--   converted to Text with toTextIgnore.
--   
--   Convenient usage of cmd requires the following:
--   
--   
--   {-# LANGUAGE OverloadedStrings #-}
--   {-# LANGUAGE ExtendedDefaultRules #-}
--   {-# OPTIONS_GHC -fno-warn-type-defaults #-}
--   import Shelly
--   import qualified Data.Text as T
--   default (T.Text)
--   
cmd :: ShellCmd result => FilePath -> result
type FoldCallback a = (a -> Text -> a)
(-|-) :: (MonadShControl m, MonadSh m) => m Text -> m b -> m b
lastStderr :: MonadSh m => m Text
setStdin :: MonadSh m => Text -> m ()
lastExitCode :: MonadSh m => m Int
command :: MonadSh m => FilePath -> [Text] -> [Text] -> m Text
command_ :: MonadSh m => FilePath -> [Text] -> [Text] -> m ()
command1 :: MonadSh m => FilePath -> [Text] -> Text -> [Text] -> m Text
command1_ :: MonadSh m => FilePath -> [Text] -> Text -> [Text] -> m ()
sshPairs :: MonadSh m => Text -> [(FilePath, [Text])] -> m Text
sshPairs_ :: MonadSh m => Text -> [(FilePath, [Text])] -> m ()

-- | For the variadic function cmd
--   
--   partially applied variadic functions require type signatures
class ShellCmd t
cmdAll :: ShellCmd t => FilePath -> [Text] -> t

-- | Argument converter for the variadic argument version of run
--   called cmd. Useful for a type signature of a function that uses
--   cmd
class CmdArg a
toTextArg :: CmdArg a => a -> Text
runHandle :: MonadShControl m => FilePath -> [Text] -> (Handle -> m a) -> m a
runHandles :: MonadShControl m => FilePath -> [Text] -> [StdHandle] -> (Handle -> Handle -> Handle -> m a) -> m a
transferLinesAndCombine :: MonadIO m => Handle -> (Text -> IO ()) -> m Text

-- | Transfer from one handle to another For example, send contents of a
--   process output to stdout. does not close the write handle.
--   
--   Also, fold over the contents being streamed line by line
transferFoldHandleLines :: a -> FoldCallback a -> Handle -> (Text -> IO ()) -> IO a
data StdHandle
InHandle :: StdStream -> StdHandle
OutHandle :: StdStream -> StdHandle
ErrorHandle :: StdStream -> StdHandle
data StdStream
Inherit :: StdStream
UseHandle :: Handle -> StdStream
CreatePipe :: StdStream
NoStream :: StdStream
setenv :: MonadSh m => Text -> Text -> m ()
get_env :: MonadSh m => Text -> m (Maybe Text)
get_env_text :: MonadSh m => Text -> m Text
get_env_all :: MonadSh m => m [(String, String)]
appendToPath :: MonadSh m => FilePath -> m ()
prependToPath :: MonadSh m => FilePath -> m ()
cd :: MonadSh m => FilePath -> m ()
chdir :: MonadShControl m => FilePath -> m a -> m a
chdir_p :: MonadShControl m => FilePath -> m a -> m a
pwd :: MonadSh m => m FilePath
echo :: MonadSh m => Text -> m ()
echo_n :: MonadSh m => Text -> m ()
echo_err :: MonadSh m => Text -> m ()
echo_n_err :: MonadSh m => Text -> m ()
inspect :: (Show s, MonadSh m) => s -> m ()
inspect_err :: (Show s, MonadSh m) => s -> m ()
tag :: (MonadShControl m, MonadSh m) => m a -> Text -> m a
trace :: MonadSh m => Text -> m ()
show_command :: FilePath -> [Text] -> Text
ls :: MonadSh m => FilePath -> m [FilePath]
lsT :: MonadSh m => FilePath -> m [Text]
test_e :: MonadSh m => FilePath -> m Bool
test_f :: MonadSh m => FilePath -> m Bool
test_d :: MonadSh m => FilePath -> m Bool
test_s :: MonadSh m => FilePath -> m Bool
test_px :: MonadSh m => FilePath -> m Bool
which :: MonadSh m => FilePath -> m (Maybe FilePath)
absPath :: MonadSh m => FilePath -> m FilePath

-- | uses System.FilePath, but can automatically convert a Text
(</>) :: (ToFilePath filepath1, ToFilePath filepath2) => filepath1 -> filepath2 -> FilePath

-- | uses System.FilePath, but can automatically convert a Text
(<.>) :: ToFilePath filepath => filepath -> Text -> FilePath
canonic :: MonadSh m => FilePath -> m FilePath

-- | Obtain a (reasonably) canonic file path to a filesystem object. Based
--   on "canonicalizePath" in system-fileio.
canonicalize :: MonadSh m => FilePath -> m FilePath
relPath :: MonadSh m => FilePath -> m FilePath
relativeTo :: MonadSh m => FilePath -> FilePath -> m FilePath

-- | flipped hasExtension for Text
hasExt :: Text -> FilePath -> Bool
mv :: MonadSh m => FilePath -> FilePath -> m ()
rm :: MonadSh m => FilePath -> m ()
rm_f :: MonadSh m => FilePath -> m ()
rm_rf :: MonadSh m => FilePath -> m ()
cp :: MonadSh m => FilePath -> FilePath -> m ()
cp_r :: MonadSh m => FilePath -> FilePath -> m ()
mkdir :: MonadSh m => FilePath -> m ()
mkdir_p :: MonadSh m => FilePath -> m ()
mkdirTree :: MonadSh m => Tree FilePath -> m ()
readfile :: MonadSh m => FilePath -> m Text
readBinary :: MonadSh m => FilePath -> m ByteString
writefile :: MonadSh m => FilePath -> Text -> m ()
appendfile :: MonadSh m => FilePath -> Text -> m ()
touchfile :: MonadSh m => FilePath -> m ()
withTmpDir :: MonadShControl m => (FilePath -> m a) -> m a
exit :: MonadSh m => Int -> m a
errorExit :: MonadSh m => Text -> m a
quietExit :: MonadSh m => Int -> m a
terror :: MonadSh m => Text -> m a

-- | Deprecated: use Control.Exception.Lifted.bracket instead
bracket_sh :: Sh a -> (a -> Sh b) -> (a -> Sh c) -> Sh c
catchany :: MonadBaseControl IO m => m a -> (SomeException -> m a) -> m a

-- | Deprecated: use Control.Exception.Lifted.catch instead
catch_sh :: Exception e => Sh a -> (e -> Sh a) -> Sh a

-- | Deprecated: use Control.Exception.Lifted.handle instead
handle_sh :: Exception e => (e -> Sh a) -> Sh a -> Sh a

-- | Deprecated: use Control.Exception.Enclosed.handleAny instead
handleany_sh :: (SomeException -> Sh a) -> Sh a -> Sh a

-- | Deprecated: use Control.Exception.Lifted.finally instead
finally_sh :: Sh a -> Sh b -> Sh a

-- | Deprecated: use Control.Exception.Lifted.catches instead
catches_sh :: Sh a -> [Handler Sh a] -> Sh a

-- | Deprecated: use Control.Exception.Enclosed.catchAny instead
catchany_sh :: Sh a -> (SomeException -> Sh a) -> Sh a

-- | silently uses the Right or Left value of
--   "Filesystem.Path.CurrentOS.toText"
toTextIgnore :: FilePath -> Text
toTextWarn :: MonadSh m => FilePath -> m Text

-- | Convert Text to a FilePath-
fromText :: Text -> FilePath

-- | A monadic-conditional version of the "when" guard.
whenM :: Monad m => m Bool -> m () -> m ()

-- | A monadic-conditional version of the unless guard.
unlessM :: Monad m => m Bool -> m () -> m ()
time :: MonadShControl m => m a -> m (Double, a)
sleep :: MonadSh m => Int -> m ()
liftIO :: MonadIO m => IO a -> m a
when :: Applicative f => Bool -> f () -> f ()
unless :: Applicative f => Bool -> f () -> f ()
type FilePath = String
(<$>) :: Functor f => (a -> b) -> f a -> f b
get :: MonadSh m => m State
put :: MonadSh m => State -> m ()

-- | List directory recursively (like the POSIX utility "find"). listing is
--   relative if the path given is relative. If you want to filter out some
--   results or fold over them you can do that with the returned files. A
--   more efficient approach is to use one of the other find functions.
find :: FilePath -> Sh [FilePath]

-- | find that filters the found files as it finds. Files must
--   satisfy the given filter to be returned in the result.
findWhen :: (FilePath -> Sh Bool) -> FilePath -> Sh [FilePath]

-- | Fold an arbitrary folding function over files froma a find.
--   Like findWhen but use a more general fold rather than a filter.
findFold :: (a -> FilePath -> Sh a) -> a -> FilePath -> Sh a

-- | find that filters out directories as it finds Filtering out
--   directories can make a find much more efficient by avoiding entire
--   trees of files.
findDirFilter :: (FilePath -> Sh Bool) -> FilePath -> Sh [FilePath]

-- | similar findWhen, but also filter out directories
--   Alternatively, similar to findDirFilter, but also filter out
--   files Filtering out directories makes the find much more efficient
findDirFilterWhen :: (FilePath -> Sh Bool) -> (FilePath -> Sh Bool) -> FilePath -> Sh [FilePath]

-- | like findDirFilterWhen but use a folding function rather than a
--   filter The most general finder: you likely want a more specific one
findFoldDirFilter :: (a -> FilePath -> Sh a) -> a -> (FilePath -> Sh Bool) -> FilePath -> Sh a
followSymlink :: MonadShControl m => Bool -> m a -> m a
instance Shelly.Lifted.MonadShControl Shelly.Base.Sh
instance Shelly.Lifted.MonadShControl m => Shelly.Lifted.MonadShControl (Control.Monad.Trans.List.ListT m)
instance Shelly.Lifted.MonadShControl m => Shelly.Lifted.MonadShControl (Control.Monad.Trans.Maybe.MaybeT m)
instance Shelly.Lifted.MonadShControl m => Shelly.Lifted.MonadShControl (Control.Monad.Trans.Identity.IdentityT m)
instance (Shelly.Lifted.MonadShControl m, GHC.Base.Monoid w) => Shelly.Lifted.MonadShControl (Control.Monad.Trans.Writer.Lazy.WriterT w m)
instance (Shelly.Lifted.MonadShControl m, GHC.Base.Monoid w) => Shelly.Lifted.MonadShControl (Control.Monad.Trans.Writer.Strict.WriterT w m)
instance (Shelly.Lifted.MonadShControl m, Control.Monad.Trans.Error.Error e) => Shelly.Lifted.MonadShControl (Control.Monad.Trans.Error.ErrorT e m)
instance Shelly.Lifted.MonadShControl m => Shelly.Lifted.MonadShControl (Control.Monad.Trans.State.Lazy.StateT s m)
instance Shelly.Lifted.MonadShControl m => Shelly.Lifted.MonadShControl (Control.Monad.Trans.State.Strict.StateT s m)
instance Shelly.Lifted.MonadShControl m => Shelly.Lifted.MonadShControl (Control.Monad.Trans.Reader.ReaderT r m)
instance (Shelly.Lifted.MonadShControl m, GHC.Base.Monoid w) => Shelly.Lifted.MonadShControl (Control.Monad.Trans.RWS.Lazy.RWST r w s m)
instance (Shelly.Lifted.MonadShControl m, GHC.Base.Monoid w) => Shelly.Lifted.MonadShControl (Control.Monad.Trans.RWS.Strict.RWST r w s m)
instance Shelly.Lifted.MonadSh Shelly.Base.Sh
instance Shelly.Lifted.MonadSh m => Shelly.Lifted.MonadSh (Control.Monad.Trans.Identity.IdentityT m)
instance Shelly.Lifted.MonadSh m => Shelly.Lifted.MonadSh (Control.Monad.Trans.List.ListT m)
instance Shelly.Lifted.MonadSh m => Shelly.Lifted.MonadSh (Control.Monad.Trans.Maybe.MaybeT m)
instance Shelly.Lifted.MonadSh m => Shelly.Lifted.MonadSh (Control.Monad.Trans.Cont.ContT r m)
instance (Control.Monad.Trans.Error.Error e, Shelly.Lifted.MonadSh m) => Shelly.Lifted.MonadSh (Control.Monad.Trans.Error.ErrorT e m)
instance Shelly.Lifted.MonadSh m => Shelly.Lifted.MonadSh (Control.Monad.Trans.Reader.ReaderT r m)
instance Shelly.Lifted.MonadSh m => Shelly.Lifted.MonadSh (Control.Monad.Trans.State.Lazy.StateT s m)
instance Shelly.Lifted.MonadSh m => Shelly.Lifted.MonadSh (Control.Monad.Trans.State.Strict.StateT s m)
instance (GHC.Base.Monoid w, Shelly.Lifted.MonadSh m) => Shelly.Lifted.MonadSh (Control.Monad.Trans.Writer.Lazy.WriterT w m)
instance (GHC.Base.Monoid w, Shelly.Lifted.MonadSh m) => Shelly.Lifted.MonadSh (Control.Monad.Trans.Writer.Strict.WriterT w m)
instance (GHC.Base.Monoid w, Shelly.Lifted.MonadSh m) => Shelly.Lifted.MonadSh (Control.Monad.Trans.RWS.Lazy.RWST r w s m)
instance (GHC.Base.Monoid w, Shelly.Lifted.MonadSh m) => Shelly.Lifted.MonadSh (Control.Monad.Trans.RWS.Strict.RWST r w s m)
instance Shelly.Lifted.MonadSh m => Shelly.ShellCmd (m Data.Text.Internal.Text)
instance (Shelly.Lifted.MonadSh m, s GHC.Types.~ Data.Text.Internal.Text, GHC.Show.Show s) => Shelly.ShellCmd (m s)
instance Shelly.Lifted.MonadSh m => Shelly.ShellCmd (m ())

-- | This module is a wrapper for the module Shelly. The only
--   difference is a main type Sh. In this module Sh contains
--   a list of results. Actual definition of the type Sh is:
--   
--   
--   import qualified Shelly as S
--   
--   newtype Sh a = Sh { unSh :: S.Sh [a] }
--   
--   
--   This definition can simplify some filesystem commands. A monad bind
--   operator becomes a pipe operator and we can write
--   
--   
--   findExt ext = findWhen (pure . hasExt ext)
--   
--   main :: IO ()
--   main = shs $ do
--       mkdir "new"
--       findExt "hs"  "." >>= flip cp "new"
--       findExt "cpp" "." >>= rm_f 
--       liftIO $ putStrLn "done"
--   
--   
--   Monad methods "return" and ">>=" behave like methods for
--   ListT Shelly.Sh, but ">>" forgets the number of the
--   empty effects. So the last line prints "done" only once.
--   
--   Documentation in this module mostly just reference documentation from
--   the main Shelly module.
--   
--   
--   {-# LANGUAGE OverloadedStrings #-}
--   {-# LANGUAGE ExtendedDefaultRules #-}
--   {-# OPTIONS_GHC -fno-warn-type-defaults #-}
--   import Shelly
--   import Data.Text as T
--   default (T.Text)
--   
module Shelly.Pipe

-- | This type is a simple wrapper for a type Shelly.Sh. Sh
--   contains a list of results.
data Sh a

-- | Performs shelly and then an empty action return ().
shs :: MonadIO m => Sh () -> m ()

-- | see shelly
shelly :: MonadIO m => Sh a -> m [a]

-- | see shellyFailDir
shellyFailDir :: MonadIO m => Sh a -> m [a]

-- | Performs shellyFailDir and then an empty action return
--   ().
shsFailDir :: MonadIO m => Sh () -> m ()

-- | see sub
sub :: Sh a -> Sh a
silently :: Sh a -> Sh a
verbosely :: Sh a -> Sh a

-- | see escaping
escaping :: Bool -> Sh a -> Sh a

-- | see print_stdout
print_stdout :: Bool -> Sh a -> Sh a

-- | see 'S.print_commands
print_commands :: Bool -> Sh a -> Sh a

-- | see tracing
tracing :: Bool -> Sh a -> Sh a

-- | see errExit
errExit :: Bool -> Sh a -> Sh a

-- | see log_stdout_with
log_stdout_with :: (Text -> IO ()) -> Sh a -> Sh a

-- | see log_stderr_with
log_stderr_with :: (Text -> IO ()) -> Sh a -> Sh a

-- | Pack list of results. It performs concat inside Sh.
roll :: Sh [a] -> Sh a

-- | Unpack list of results.
unroll :: Sh a -> Sh [a]

-- | Transform result as list. It can be useful for filtering.
liftSh :: ([a] -> [b]) -> Sh a -> Sh b
type FoldCallback a = (a -> Text -> a)

-- | see run
run :: FilePath -> [Text] -> Sh Text

-- | see run_
run_ :: FilePath -> [Text] -> Sh ()

-- | see runFoldLines
runFoldLines :: a -> FoldCallback a -> FilePath -> [Text] -> Sh a

-- | see cmd
cmd :: ShellCommand result => FilePath -> result

-- | see -|-
(-|-) :: Sh Text -> Sh b -> Sh b

-- | see lastStderr
lastStderr :: Sh Text

-- | see setStdin
setStdin :: Text -> Sh ()

-- | see lastExitCode
lastExitCode :: Sh Int

-- | see command
command :: FilePath -> [Text] -> [Text] -> Sh Text

-- | see command_
command_ :: FilePath -> [Text] -> [Text] -> Sh ()

-- | see command1
command1 :: FilePath -> [Text] -> Text -> [Text] -> Sh Text

-- | see command1_
command1_ :: FilePath -> [Text] -> Text -> [Text] -> Sh ()

-- | see sshPairs
sshPairs :: Text -> [(FilePath, [Text])] -> Sh Text

-- | see sshPairs_
sshPairs_ :: Text -> [(FilePath, [Text])] -> Sh ()

-- | see setenv
setenv :: Text -> Text -> Sh ()

-- | see get_env
get_env :: Text -> Sh (Maybe Text)

-- | see get_env_text
get_env_text :: Text -> Sh Text

-- | see get_env_def

-- | Deprecated: use fromMaybe DEFAULT get_env
get_env_def :: Text -> Text -> Sh Text

-- | see appendToPath
appendToPath :: FilePath -> Sh ()

-- | see prependToPath
prependToPath :: FilePath -> Sh ()

-- | see cd
cd :: FilePath -> Sh ()

-- | see chdir
chdir :: FilePath -> Sh a -> Sh a

-- | see pwd
pwd :: Sh FilePath

-- | Echo text to standard (error, when using _err variants) output. The _n
--   variants do not print a final newline.
echo :: Text -> Sh ()

-- | Echo text to standard (error, when using _err variants) output. The _n
--   variants do not print a final newline.
echo_n :: Text -> Sh ()

-- | Echo text to standard (error, when using _err variants) output. The _n
--   variants do not print a final newline.
echo_err :: Text -> Sh ()

-- | Echo text to standard (error, when using _err variants) output. The _n
--   variants do not print a final newline.
echo_n_err :: Text -> Sh ()

-- | see inspect
inspect :: Show s => s -> Sh ()

-- | see inspect_err
inspect_err :: Show s => s -> Sh ()

-- | see tag
tag :: Sh a -> Text -> Sh a

-- | see trace
trace :: Text -> Sh ()

-- | see show_command
show_command :: FilePath -> [Text] -> Text

-- | see ls
ls :: FilePath -> Sh FilePath

-- | see lsT
lsT :: FilePath -> Sh Text

-- | see test_e
test_e :: FilePath -> Sh Bool

-- | see test_f
test_f :: FilePath -> Sh Bool

-- | see test_d
test_d :: FilePath -> Sh Bool

-- | see test_s
test_s :: FilePath -> Sh Bool

-- | see 'S.which
which :: FilePath -> Sh (Maybe FilePath)

-- | see absPath
absPath :: FilePath -> Sh FilePath

-- | uses System.FilePath, but can automatically convert a Text
(</>) :: (ToFilePath filepath1, ToFilePath filepath2) => filepath1 -> filepath2 -> FilePath

-- | uses System.FilePath, but can automatically convert a Text
(<.>) :: ToFilePath filepath => filepath -> Text -> FilePath

-- | see canonic
canonic :: FilePath -> Sh FilePath

-- | see canonicalize
canonicalize :: FilePath -> Sh FilePath

-- | see relPath
relPath :: FilePath -> Sh FilePath

-- | see relativeTo
relativeTo :: FilePath -> FilePath -> Sh FilePath

-- | flipped hasExtension for Text
hasExt :: Text -> FilePath -> Bool

-- | see mv
mv :: FilePath -> FilePath -> Sh ()

-- | see rm
rm :: FilePath -> Sh ()

-- | see rm_f
rm_f :: FilePath -> Sh ()

-- | see rm_rf
rm_rf :: FilePath -> Sh ()

-- | see cp
cp :: FilePath -> FilePath -> Sh ()

-- | see cp_r
cp_r :: FilePath -> FilePath -> Sh ()

-- | see mkdir
mkdir :: FilePath -> Sh ()

-- | see mkdir_p
mkdir_p :: FilePath -> Sh ()

-- | see mkdirTree
mkdirTree :: Tree FilePath -> Sh ()

-- | see readFile
readfile :: FilePath -> Sh Text

-- | see readBinary
readBinary :: FilePath -> Sh ByteString

-- | see writeFile
writefile :: FilePath -> Text -> Sh ()

-- | see appendFile
appendfile :: FilePath -> Text -> Sh ()

-- | see touchFile
touchfile :: FilePath -> Sh ()

-- | see withTmpDir
withTmpDir :: (FilePath -> Sh a) -> Sh a

-- | see exit
exit :: Int -> Sh ()

-- | see errorExit
errorExit :: Text -> Sh ()

-- | see quietExit
quietExit :: Int -> Sh ()

-- | see terror
terror :: Text -> Sh a

-- | A helper to catch any exception (same as ... catch (e ::
--   SomeException) -> ...).
catchany :: IO a -> (SomeException -> IO a) -> IO a

-- | see catch_sh
catch_sh :: Exception e => Sh a -> (e -> Sh a) -> Sh a

-- | see finally_sh
finally_sh :: Sh a -> Sh b -> Sh a

-- | see ShellyHandler
data ShellyHandler a
ShellyHandler :: (e -> Sh a) -> ShellyHandler a

-- | see catches_sh
catches_sh :: Sh a -> [ShellyHandler a] -> Sh a

-- | see catchany_sh
catchany_sh :: Sh a -> (SomeException -> Sh a) -> Sh a

-- | silently uses the Right or Left value of
--   "Filesystem.Path.CurrentOS.toText"
toTextIgnore :: FilePath -> Text

-- | see toTextWarn
toTextWarn :: FilePath -> Sh Text

-- | Convert Text to a FilePath-
fromText :: Text -> FilePath
(<$>) :: Functor f => (a -> b) -> f a -> f b

-- | A monadic-conditional version of the "when" guard.
whenM :: Monad m => m Bool -> m () -> m ()

-- | A monadic-conditional version of the unless guard.
unlessM :: Monad m => m Bool -> m () -> m ()

-- | see time
time :: Sh a -> Sh (Double, a)
liftIO :: MonadIO m => IO a -> m a
when :: Applicative f => Bool -> f () -> f ()
unless :: Applicative f => Bool -> f () -> f ()
type FilePath = String
get :: Sh State
put :: State -> Sh ()

-- | see find
find :: FilePath -> Sh FilePath

-- | see findWhen
findWhen :: (FilePath -> Sh Bool) -> FilePath -> Sh FilePath

-- | see findFold
findFold :: (a -> FilePath -> Sh a) -> a -> FilePath -> Sh a

-- | see findDirFilter
findDirFilter :: (FilePath -> Sh Bool) -> FilePath -> Sh FilePath

-- | see findDirFilterWhen
findDirFilterWhen :: (FilePath -> Sh Bool) -> (FilePath -> Sh Bool) -> FilePath -> Sh FilePath

-- | see findFoldDirFilterWhen
findFoldDirFilter :: (a -> FilePath -> Sh a) -> a -> (FilePath -> Sh Bool) -> FilePath -> Sh a

-- | see followSymlink
followSymlink :: Bool -> Sh a -> Sh a
instance Shelly.Pipe.ShellCommand (Shelly.Pipe.Sh Data.Text.Internal.Text)
instance (s GHC.Types.~ Data.Text.Internal.Text, GHC.Show.Show s) => Shelly.Pipe.ShellCommand (Shelly.Pipe.Sh s)
instance Shelly.Pipe.ShellCommand (Shelly.Pipe.Sh ())
instance (Shelly.Pipe.ShellArg arg, Shelly.Pipe.ShellCommand result) => Shelly.Pipe.ShellCommand (arg -> result)
instance Shelly.Pipe.ShellArg Data.Text.Internal.Text
instance Shelly.Pipe.ShellArg GHC.IO.FilePath
instance GHC.Base.Functor Shelly.Pipe.Sh
instance GHC.Base.Monad Shelly.Pipe.Sh
instance GHC.Base.Applicative Shelly.Pipe.Sh
instance GHC.Base.Alternative Shelly.Pipe.Sh
instance GHC.Base.MonadPlus Shelly.Pipe.Sh
instance Control.Monad.IO.Class.MonadIO Shelly.Pipe.Sh

-- | commands that only work on Unix
module Shelly.Unix
kill :: Int -> Sh ()
