From 34c6223c2537028576b2b7109376152dd91b24ad Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Fri, 18 Dec 2015 15:28:04 +0100 Subject: [PATCH] LIB: fix throwDirDoesExist exception type --- src/IO/Error.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/IO/Error.hs b/src/IO/Error.hs index 3f44b10..1e421bd 100644 --- a/src/IO/Error.hs +++ b/src/IO/Error.hs @@ -36,6 +36,7 @@ data FmIOException = FileDoesNotExist String | NotAFile String | NotADir String | DestinationInSource String String + | DirDoesExist String deriving (Show, Typeable) @@ -65,7 +66,7 @@ throwNotAbsolute fp = unless (isAbsolute fp) (throw $ PathNotAbsolute fp) throwDirDoesExist :: FilePath -> IO () throwDirDoesExist fp = do exists <- doesDirectoryExist fp - when exists (throw $ FileDoesNotExist fp) + when exists (throw $ DirDoesExist fp) throwDirDoesNotExist :: FilePath -> IO ()