Skip to content

Commit

Permalink
New exec variants: add argument-level documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed Jan 11, 2024
1 parent 03a8ed1 commit d0b1bdc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Hedgehog/Extras/Test/Process.hs
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@ execFlex' execConfig pkgBin envBin arguments = GHC.withFrozenCallStack $ do
execFlexAny'
:: (MonadTest m, MonadCatch m, MonadIO m, HasCallStack)
=> ExecConfig
-> String
-> String
-> String -- ^ @pkgBin@: name of the binary to launch via 'cabal exec'
-> String -- ^ @envBin@: environment variable defining the binary to launch the process, when in Nix
-> [String]
-> m (ExitCode, String, String)
-> m (ExitCode, String, String) -- ^ exit code, stdout, stderr
execFlexAny' execConfig pkgBin envBin arguments = GHC.withFrozenCallStack $ do
cp <- procFlex' execConfig pkgBin envBin arguments
H.annotate . ("Command: " <>) $ case IO.cmdspec cp of
Expand Down Expand Up @@ -230,9 +230,9 @@ exec execConfig bin arguments = GHC.withFrozenCallStack $ do
execAny
:: (MonadTest m, MonadIO m, HasCallStack)
=> ExecConfig
-> String
-> [String]
-> m (ExitCode, String, String)
-> String -- ^ The binary to launch
-> [String] -- ^ The binary's arguments
-> m (ExitCode, String, String) -- ^ exit code, stdout, stderr
execAny execConfig bin arguments = GHC.withFrozenCallStack $ do
let cp = (IO.proc bin arguments)
{ IO.env = getLast $ execConfigEnv execConfig
Expand Down

0 comments on commit d0b1bdc

Please sign in to comment.