-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-enable QSM tests for all distributions
- Loading branch information
Showing
7 changed files
with
78 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module System.FS.IO.Internal.Error (sameError) where | ||
|
||
import System.FS.API.Types (FsError, sameFsError) | ||
|
||
sameError :: FsError -> FsError -> Bool | ||
sameError = sameFsError | ||
|
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,17 @@ | ||
module System.FS.IO.Internal.Error (sameError) where | ||
|
||
import System.FS.API.Types (FsError (..), FsErrorType (..), | ||
sameFsError) | ||
|
||
-- Check default implementation first using 'sameFsError', and otherwise permit | ||
-- some combinations of error types that are not structurally equal. | ||
sameError :: FsError -> FsError -> Bool | ||
sameError e1 e2 = sameFsError e1 e2 | ||
|| (fsErrorPath e1 == fsErrorPath e2 | ||
&& permitted (fsErrorType e1) (fsErrorType e2)) | ||
where | ||
-- error types that are permitted to differ for technical reasons | ||
permitted ty1 ty2 = case (ty1, ty2) of | ||
(FsInsufficientPermissions , FsResourceInappropriateType) -> True | ||
(FsResourceInappropriateType, FsInsufficientPermissions ) -> True | ||
(_ , _ ) -> False |
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