checkE :: OnErr -> ShellProcess -> ShellProcess
checkE CheckE = withShellProcess $ \sp ->
                do ec <- sp
                   am_e <- getFlag 'e'
                   when (am_e && ec/=ExitSuccess) $ liftIO $ exitWith ec
                   return ec
checkE :: OnErr -> ShellProcess -> ShellProcess
checkE CheckE = withShellProcess $ \sp ->
                do ec <- sp
                   am_e <- getFlag 'e'
                   when (am_e && ec/=ExitSuccess) $ liftIO $ exitWith ec
                   return ec
checkE CheckE = withShellProcess $ \sp ->
                do ec <- sp
                   am_e <- getFlag 'e'
                   when (am_e && ec/=ExitSuccess) $ liftIO $ exitWith ec
                   return ec