{-# LANGUAGE Safe #-}
module Relude.Lifted.Exit
( exitWith
, exitFailure
, exitSuccess
, die
) where
import Control.Monad.Trans (MonadIO, liftIO)
import Data.String (String)
import System.Exit (ExitCode)
import qualified System.Exit as XIO
exitWith :: MonadIO m => ExitCode -> m a
exitWith a = liftIO (XIO.exitWith a)
{-# INLINE exitWith #-}
exitFailure :: MonadIO m => m a
exitFailure = liftIO XIO.exitFailure
{-# INLINE exitFailure #-}
exitSuccess :: MonadIO m => m a
exitSuccess = liftIO XIO.exitSuccess
{-# INLINE exitSuccess #-}
die :: MonadIO m => String -> m ()
die err = liftIO (XIO.die err)
{-# INLINE die #-}