diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2014-12-06 17:08:06 +0100 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2014-12-06 17:08:06 +0100 |
commit | 078666f4399f368e2f3dd82b5081dc1ad9b9fdc2 (patch) | |
tree | 247882ab50a9e32a659aa513751f9e16ec310207 /System/Posix/Process/Internals.hs | |
parent | 558b0fb4eaa4aebc823022b3e1d560da3faad658 (diff) |
`M-x untabify` && `M-x delete-trailing-whitespace`
Diffstat (limited to 'System/Posix/Process/Internals.hs')
-rw-r--r-- | System/Posix/Process/Internals.hs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/System/Posix/Process/Internals.hs b/System/Posix/Process/Internals.hs index b320dc7..19dc1c1 100644 --- a/System/Posix/Process/Internals.hs +++ b/System/Posix/Process/Internals.hs @@ -39,25 +39,25 @@ decipherWaitStatus wstat = then do let exitstatus = c_WEXITSTATUS wstat if exitstatus == 0 - then return (Exited ExitSuccess) - else return (Exited (ExitFailure (fromIntegral exitstatus))) + then return (Exited ExitSuccess) + else return (Exited (ExitFailure (fromIntegral exitstatus))) else do if c_WIFSIGNALED wstat /= 0 - then do + then do let termsig = c_WTERMSIG wstat let coredumped = c_WCOREDUMP wstat /= 0 return (Terminated termsig coredumped) - else do - if c_WIFSTOPPED wstat /= 0 - then do - let stopsig = c_WSTOPSIG wstat + else do + if c_WIFSTOPPED wstat /= 0 + then do + let stopsig = c_WSTOPSIG wstat return (Stopped stopsig) - else do - ioError (mkIOError illegalOperationErrorType - "waitStatus" Nothing Nothing) + else do + ioError (mkIOError illegalOperationErrorType + "waitStatus" Nothing Nothing) foreign import ccall unsafe "__hsunix_wifexited" - c_WIFEXITED :: CInt -> CInt + c_WIFEXITED :: CInt -> CInt foreign import ccall unsafe "__hsunix_wexitstatus" c_WEXITSTATUS :: CInt -> CInt @@ -66,7 +66,7 @@ foreign import ccall unsafe "__hsunix_wifsignaled" c_WIFSIGNALED :: CInt -> CInt foreign import ccall unsafe "__hsunix_wtermsig" - c_WTERMSIG :: CInt -> CInt + c_WTERMSIG :: CInt -> CInt foreign import ccall unsafe "__hsunix_wifstopped" c_WIFSTOPPED :: CInt -> CInt |