[commit: packages/directory] master: Cleans up canonicalizePath (abfa69b)

git at git.haskell.org git at git.haskell.org
Thu Mar 19 11:37:40 UTC 2015


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

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

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

commit abfa69b28b55ff2dd2b541f8c881b028b960cc7e
Author: Elliot Robinson <elliot.robinson at argiopetech.com>
Date:   Sun Feb 22 15:46:11 2015 -0500

    Cleans up canonicalizePath


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

abfa69b28b55ff2dd2b541f8c881b028b960cc7e
 tests/canonicalizePath001.hs | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/tests/canonicalizePath001.hs b/tests/canonicalizePath001.hs
index 48108a4..dc21cd8 100644
--- a/tests/canonicalizePath001.hs
+++ b/tests/canonicalizePath001.hs
@@ -1,28 +1,10 @@
 module Main(main) where
 
-import Control.Concurrent
-import Control.Monad
 import Control.Exception
 import System.Directory
-import System.FilePath
-import System.IO.Error
 
 main = do
   dot <- canonicalizePath "."
   nul <- (canonicalizePath "")
            `catch` ((\_ -> return "") :: IOException -> IO String)
-  print $ dot == nul
-
-report :: Show a => IO a -> IO ()
-report io = do
-  r <- try io
-  case r of
-   Left e  -> print (e :: SomeException)
-   Right a -> print a
-
-ignore :: IO a -> IO ()
-ignore io = do
-  r <- try io
-  case r of
-   Left e  -> let _ = e :: SomeException in return ()
-   Right a -> return ()
+  print (dot == nul)



More information about the ghc-commits mailing list