A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://hackage.haskell.org/packages/archive/base/4.6.0.0/doc/html/src/System-Exit.html below:

System/Exit.hs


















module System.Exit
    (
      ExitCode(ExitSuccess,ExitFailure)
    , exitWith      
    , exitFailure   
    , exitSuccess   
  ) where

import Prelude

#ifdef __GLASGOW_HASKELL__
import GHC.IO
import GHC.IO.Exception
#endif

#ifdef __HUGS__
import Hugs.Prelude (ExitCode(..))
import Control.Exception.Base
#endif

#ifdef __NHC__
import System
  ( ExitCode(..)
  , exitWith
  )
#endif






























#ifndef __NHC__
exitWith :: ExitCode -> IO a
exitWith ExitSuccess = throwIO ExitSuccess
exitWith code@(ExitFailure n)
  | n /= 0 = throwIO code
#ifdef __GLASGOW_HASKELL__
  | otherwise = ioError (IOError Nothing InvalidArgument "exitWith" "ExitFailure 0" Nothing Nothing)
#endif
#endif  /* ! __NHC__ */




exitFailure :: IO a
exitFailure = exitWith (ExitFailure 1)




exitSuccess :: IO a
exitSuccess = exitWith ExitSuccess


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4