{-# LANGUAGE CPP, NoImplicitPrelude #-}
module System.IO.Error.Compat (
module Base
, isResourceVanishedError
, resourceVanishedErrorType
, isResourceVanishedErrorType
) where
import System.IO.Error as Base
#if !(MIN_VERSION_base(4,14,0))
import GHC.IO.Exception (IOErrorType(..))
import Prelude.Compat
isResourceVanishedError :: IOError -> Bool
isResourceVanishedError = isResourceVanishedErrorType . ioeGetErrorType
resourceVanishedErrorType :: IOErrorType
resourceVanishedErrorType = ResourceVanished
isResourceVanishedErrorType :: IOErrorType -> Bool
isResourceVanishedErrorType ResourceVanished = True
isResourceVanishedErrorType _ = False
#endif