HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleprocex-0.3.3Haskell2010

Procex.Quick

This module defines functions and type classes for making the syntax more succint.

  • 3 classes
  • 19 values
  • Packageprocex-0.3.3
  • Exports22
  • LanguageHaskell2010
  • LicenceMIT
  • SourceQuick.hs
value(<!|) :: QuickCmd a => Cmd -> Cmd -> a
#

Pipe from the right command's stderr to the left command. Returns the left command modified.

value(<|) :: QuickCmd a => Cmd -> Cmd -> a
#

Pipe from the right command to the left command. Returns the left command modified.

value(|!>) :: QuickCmd a => Cmd -> Cmd -> a
#

Pipe from the left command's stderr to the right command. Returns the left command modified.

value(|>) :: QuickCmd a => Cmd -> Cmd -> a
#

Pipe from the left command to the right command. Returns the left command modified.

valuecaptureFd :: Fd -> Cmd -> IO ByteString
#

Capture the output of the fd of the command strictly, err if the command exits with a non-zero exit code.

valuecaptureFdLazy :: Fd -> Cmd -> IO ByteString
#

Capture the output of the fd of the command lazily. If the process exits with a non-zero exit code, reading from the bytestring will throw CmdException. Garbage collection will close the pipe.

valuepipeArgStrIn :: ToByteString b => b -> Cmd -> Cmd
#

Pass an argument of the form /proc/self/fd/<n> to the process, where n is the reader end of a pipe which the passed string is written to.

valuemq
  1. :: (QuickCmd a, ToByteString b)
  2. => b

    The path to the executable, uses PATH

  3. -> a

    Either a Cmd, an IO (), or a function that takes Cmd -> Cmd , String or ByteString

#
Example1 expression
mq "cat" "/dev/null" (pipeArgIn 1 $ mq "cat" "/dev/null") <<< "somestr"

The first argument is the path, and the subsequent arguments are QuickCmdArg. At the end you will either have an IO () (synchronous execution) or Cmd (which you can further use).

classclass QuickCmd a where
#

A helper class to allow lightweight syntax for executing commands

Methods

Instances3QuickCmd
classclass QuickCmdArg a where
#

If a type implements this, you can pass it to mq.

Methods

Instances12QuickCmdArg, …