[commit: packages/directory] master: tryIOErrorType needs to be defined on Windows too (7064e39)

git at git.haskell.org git at git.haskell.org
Sun Feb 14 22:19:13 UTC 2016


Repository : ssh://git@git.haskell.org/directory

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/7064e39417a1fa8136b45fc858d0c2f47896e3db/directory

>---------------------------------------------------------------

commit 7064e39417a1fa8136b45fc858d0c2f47896e3db
Author: Phil Ruffwind <rf at rufflewind.com>
Date:   Tue Feb 9 22:00:08 2016 -0500

    tryIOErrorType needs to be defined on Windows too


>---------------------------------------------------------------

7064e39417a1fa8136b45fc858d0c2f47896e3db
 System/Directory.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/System/Directory.hs b/System/Directory.hs
index 0c6e830..4eb6303 100644
--- a/System/Directory.hs
+++ b/System/Directory.hs
@@ -1509,6 +1509,7 @@ lookupEnv name = do
   case env of
     Left  _     -> return Nothing
     Right value -> return (Just value)
+#endif
 
 -- | Similar to 'try' but only catches a specify kind of 'IOError' as
 --   specified by the predicate.
@@ -1518,7 +1519,6 @@ tryIOErrorType check action = do
   case result of
     Left  err -> if check err then return (Left err) else ioError err
     Right val -> return (Right val)
-#endif
 
 specializeErrorString :: String -> (IOError -> Bool) -> IO a -> IO a
 specializeErrorString str errType action = do



More information about the ghc-commits mailing list