{-# 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 :: IOError -> Bool
isResourceVanishedError = IOErrorType -> Bool
isResourceVanishedErrorType (IOErrorType -> Bool)
-> (IOError -> IOErrorType) -> IOError -> Bool
forall b c a. (b -> c) -> (a -> b) -> a -> c
. IOError -> IOErrorType
ioeGetErrorType
resourceVanishedErrorType :: IOErrorType
resourceVanishedErrorType :: IOErrorType
resourceVanishedErrorType = IOErrorType
ResourceVanished
isResourceVanishedErrorType :: IOErrorType -> Bool
isResourceVanishedErrorType :: IOErrorType -> Bool
isResourceVanishedErrorType ResourceVanished = Bool
True
isResourceVanishedErrorType _ = Bool
False
#endif