We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05e8a1e commit e1318eaCopy full SHA for e1318ea
examples/24-exitcode.hell
@@ -0,0 +1,13 @@
1
+main = do
2
+ (code, out, err) <- ByteString.readProcess (Process.proc "ls" ["-al"])
3
+
4
+ -- Accessor style
5
+ Exit.exitCode
6
+ (Text.putStrLn "All good!")
7
+ (\i -> IO.print i)
8
+ code
9
10
+ -- Validation style
11
+ if Eq.eq code Exit.ExitSuccess
12
+ then Text.putStrLn "OK, good!"
13
+ else Text.putStrLn "Oh, sad."
0 commit comments