Skip to content

Commit

Permalink
Add Process.nullStream (#82)
Browse files Browse the repository at this point in the history
* rename number of `optparse` example

* add `Process.setStdin` and `Process.setStderr`

* add `Process.nullStream`

* create example for `Process.nullStream`

* bump `base` upper bound
  • Loading branch information
austin-artificial authored Jan 20, 2025
1 parent 5d84d82 commit 6dd4928
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 1 deletion.
File renamed without changes.
3 changes: 3 additions & 0 deletions examples/33-null-stream.hell
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
main = do
-- discard stdout
Process.runProcess_ $ Process.setStdout Process.nullStream $ Process.proc "ls" []
2 changes: 1 addition & 1 deletion hell.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ executable hell
QuickCheck
, aeson
, async
, base >=4.17.2.1 && <4.18
, base >=4.17.2.1 && <4.19
, bytestring
, constraints
, containers
Expand Down
3 changes: 3 additions & 0 deletions src/Hell.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1653,7 +1653,10 @@ polyLits =
-- Process
"Process.runProcess" runProcess :: forall a b c. ProcessConfig a b c -> IO ExitCode
"Process.runProcess_" runProcess_ :: forall a b c. ProcessConfig a b c -> IO ()
"Process.setStdin" setStdin :: forall stdin stdin' stdout stderr. StreamSpec 'STInput stdin' -> ProcessConfig stdin stdout stderr -> ProcessConfig stdin' stdout stderr
"Process.setStdout" setStdout :: forall stdin stdout stdout' stderr. StreamSpec 'STOutput stdout' -> ProcessConfig stdin stdout stderr -> ProcessConfig stdin stdout' stderr
"Process.setStderr" setStderr :: forall stdin stdout stderr stderr'. StreamSpec 'STOutput stderr' -> ProcessConfig stdin stdout stderr -> ProcessConfig stdin stdout stderr'
"Process.nullStream" Process.nullStream :: forall (a :: StreamType). StreamSpec a ()
"Process.useHandleClose" useHandleClose :: forall (a :: StreamType). IO.Handle -> StreamSpec a ()
"Process.useHandleOpen" useHandleOpen :: forall (a :: StreamType). IO.Handle -> StreamSpec a ()
"Process.setWorkingDir" process_setWorkingDir :: forall a b c. Text -> ProcessConfig a b c -> ProcessConfig a b c
Expand Down

0 comments on commit 6dd4928

Please sign in to comment.