-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport instances introduced in base-4.14
Checks off the `base-4.14.0.0` box in #24.
- Loading branch information
1 parent
ac30736
commit 2d085f1
Showing
12 changed files
with
143 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{-# LANGUAGE CPP, NoImplicitPrelude, PackageImports #-} | ||
module System.IO.Error.Compat ( | ||
module Base | ||
) where | ||
|
||
import "base-compat" System.IO.Error.Compat as Base |
8 changes: 8 additions & 0 deletions
8
base-compat-batteries/src/System/IO/Error/Compat/Repl/Batteries.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{-# LANGUAGE PackageImports #-} | ||
{-# OPTIONS_GHC -fno-warn-dodgy-exports -fno-warn-unused-imports #-} | ||
-- | Reexports "System.IO.Error.Compat" | ||
-- from a globally unique namespace. | ||
module System.IO.Error.Compat.Repl.Batteries ( | ||
module System.IO.Error.Compat | ||
) where | ||
import "this" System.IO.Error.Compat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{-# 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 | ||
|
||
-- | An error indicating that the operation failed because the | ||
-- resource vanished. See 'resourceVanishedErrorType'. | ||
-- | ||
-- /Since 4.14.0.0/ | ||
isResourceVanishedError :: IOError -> Bool | ||
isResourceVanishedError = isResourceVanishedErrorType . ioeGetErrorType | ||
|
||
-- | I\/O error where the operation failed because the resource vanished. | ||
-- This happens when, for example, attempting to write to a closed | ||
-- socket or attempting to write to a named pipe that was deleted. | ||
-- | ||
-- /Since 4.14.0.0/ | ||
resourceVanishedErrorType :: IOErrorType | ||
resourceVanishedErrorType = ResourceVanished | ||
|
||
-- | I\/O error where the operation failed because the resource vanished. | ||
-- See 'resourceVanishedErrorType'. | ||
-- | ||
-- /Since 4.14.0.0/ | ||
isResourceVanishedErrorType :: IOErrorType -> Bool | ||
isResourceVanishedErrorType ResourceVanished = True | ||
isResourceVanishedErrorType _ = False | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{-# LANGUAGE PackageImports #-} | ||
{-# OPTIONS_GHC -fno-warn-dodgy-exports -fno-warn-unused-imports #-} | ||
-- | Reexports "System.IO.Error.Compat" | ||
-- from a globally unique namespace. | ||
module System.IO.Error.Compat.Repl ( | ||
module System.IO.Error.Compat | ||
) where | ||
import "this" System.IO.Error.Compat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters