The process-conduit package

[Tags: bsd3, deprecated, library]

Deprecated in favor of conduit-extra

Conduits for processes. For more details: https://github.com/tanakh/process-conduit/blob/master/README.md


[Skip to ReadMe]

Properties

Versions0.0.0, 0.0.1, 0.0.2, 0.0.3, 0.0.4, 0.1.0, 0.4.0, 0.4.1, 0.5.0, 0.5.0.1, 0.5.0.2, 0.5.0.3, 0.5.0.4, 0.5.0.5, 1.0.0.0, 1.0.0.1, 1.0.0.2, 1.0.0.3, 1.1.0.0, 1.2.0.0, 1.2.0.1
Change logNone available
Dependenciesbase (==4.*), bytestring (==0.9.*), conduit (==0.4.*), mtl (>=2.0 && <2.2), process (>=1.0 && <1.2), process-conduit, resourcet, shakespeare-text, template-haskell (>=2.4 && <2.8), text (==0.11.*) [details]
LicenseBSD3
Copyright(c) 2011-2012, Hideyuki Tanaka
AuthorHideyuki Tanaka
MaintainerHideyuki Tanaka <tanaka.hideyuki@gmail.com>
CategorySystem, Conduit
Home pagehttp://github.com/tanakh/process-conduit
Source repositoryhead: git clone git://github.com/tanakh/process-conduit.git
Executablesprocess-qq, process-conduit
UploadedMon May 14 05:06:47 UTC 2012 by HideyukiTanaka
DistributionsDebian:1.1.0.0, NixOS:1.2.0.1
Downloads10617 total (123 in last 30 days)
Votes
0 []
StatusDocs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Flags

NameDescriptionDefaultType
examplesBuild examplesDisabledAutomatic

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for process-conduit-0.4.1

process-conduit: Conduit for processes

About

This package provides conduit for processes. Also this provides quasi-quoters for process using it.

Install

$ cabal update
$ cabal install process-conduit

Document

Haddock documents are here:

http://hackage.haskell.org/package/process-conduit

Quasi Quoters

process-conduit has three quasi-quoters, cmd, scmd and ccmd.

The result type of cmd is Lazy ByteString, but execution will perform strictly.

The result type of scmd and ccmd are Source ByteString m ByteString and Conduit ByteString m ByteString respectively.

If a command is failed, an exception is thrown.

Commands are executed in run-time, not compile-time.

Examples

import qualified Data.Conduit as C
import qualified Data.Conduit.Binary as CB
import Data.Conduit.Process
import System.IO

main :: IO ()
main = C.runResourceT $ do
  sourceCmd "ls" C.$= conduitCmd "sort" C.$$ CB.sinkHandle stdout
{-# LANGUAGE QuasiQuotes #-}
import System.Process.QQ

main = print =<< [cmd|ls|]
main :: IO ()
main = runResourceT $ do
  [scmd|ls|] $= [ccmd|sort|] $$ sinkHandle stdout
main = do
  [url] <- getArgs
  print =<< [cmd|curl #{url}|]