From d0b1bdcc0deb10874fd1e926ceacd2d42c00a080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Hurlin?= Date: Thu, 11 Jan 2024 11:07:19 +0100 Subject: [PATCH] New exec variants: add argument-level documentation --- src/Hedgehog/Extras/Test/Process.hs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Hedgehog/Extras/Test/Process.hs b/src/Hedgehog/Extras/Test/Process.hs index 6b59a8b9..4ba2039d 100644 --- a/src/Hedgehog/Extras/Test/Process.hs +++ b/src/Hedgehog/Extras/Test/Process.hs @@ -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 @@ -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