HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

Moduleprocex-0.3.3Haskell2010

Procex.Quick

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

Synopsis
  • 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.

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 QuickCmdArg a where

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

Methods

Instances12QuickCmdArg, …