Skip to content

Commit

Permalink
update README
Browse files Browse the repository at this point in the history
  • Loading branch information
tanakh committed Jul 11, 2012
1 parent 008874a commit 45e5a97
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions README.md
@@ -1,5 +1,5 @@
process-conduit: Conduit for processes
===============================================
======================================

# About

Expand Down Expand Up @@ -28,8 +28,8 @@ 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.
`GSource m ByteString` and
`GConduit ByteString m ByteString` respectively.

If a command is failed, an exception is thrown.

Expand All @@ -40,14 +40,14 @@ Commands are executed in ***run-time***, not compile-time.
* Create a Source and a Conduit of process

~~~ {.haskell}
import qualified Data.Conduit as C
import Data.Conduit
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
main = runResourceT $ do
sourceCmd "ls" $= conduitCmd "sort" $$ CB.sinkHandle stdout
~~~

* Invoke a process simply
Expand All @@ -64,7 +64,7 @@ main = print =<< [cmd|ls|]
~~~ {.haskell}
main :: IO ()
main = runResourceT $ do
[scmd|ls|] $= [ccmd|sort|] $$ sinkHandle stdout
[scmd|ls|] $= [ccmd|sort|] $$ CB.sinkHandle stdout
~~~

* Unquoting (syntax is same as [shakespeare-text](http://hackage.haskell.org/package/shakespeare-text))
Expand Down

0 comments on commit 45e5a97

Please sign in to comment.