1 import System.Directory
\r
2 import Control.Exception
\r
4 testdir = "createDirectory001.dir"
\r
7 try (removeDirectory testdir) :: IO (Either IOException ())
\r
8 createDirectory testdir
\r
9 r <- try $ createDirectory testdir
\r
10 print (r :: Either IOException ()) -- already exists
\r
11 removeDirectory testdir
\r