{-# LANGUAGE Safe #-}{- |Copyright: (c) 2016 Stephen Diehl (c) 20016-2018 Serokell (c) 2018 KowainikLicense: MITMaintainer: Kowainik <xrom.xkov@gmail.com>Lifted versions of functions that work with exit processes.-}module Relude.Lifted.Exit ( exitWith , exitFailure , exitSuccess , die ) whereimport Control.Monad.Trans (MonadIO, liftIO)import Data.String (String)import System.Exit (ExitCode)import qualified System.Exit as XIO-- | Lifted version of 'System.Exit.exitWith'.exitWith :: MonadIO m => ExitCode -> m aexitWith a = liftIO (XIO.exitWith a){-# INLINE exitWith #-}-- | Lifted version of 'System.Exit.exitFailure'.exitFailure :: MonadIO m => m aexitFailure = liftIO XIO.exitFailure{-# INLINE exitFailure #-}-- | Lifted version of 'System.Exit.exitSuccess'.exitSuccess :: MonadIO m => m aexitSuccess = liftIO XIO.exitSuccess{-# INLINE exitSuccess #-}-- | Lifted version of 'System.Exit.die'.die :: MonadIO m => String -> m ()die err = liftIO (XIO.die err){-# INLINE die #-}