From 4491882688176b7b587f07513ab2a3c492ab5fdb Mon Sep 17 00:00:00 2001 From: David Waern Date: Thu, 13 May 2010 19:43:05 +0000 Subject: Two newlines between declarations in Main --- src/Main.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/Main.hs b/src/Main.hs index 5a4e27cc..4c0728db 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -69,6 +69,7 @@ handleTopExceptions :: IO a -> IO a handleTopExceptions = handleNormalExceptions . handleHaddockExceptions . handleGhcExceptions + -- | Either returns normally or throws an ExitCode exception; -- all other exceptions are turned into exit exceptions. handleNormalExceptions :: IO a -> IO a @@ -336,6 +337,7 @@ withGhc libDir flags ghcActs = do -- Misc ------------------------------------------------------------------------------- + getHaddockLibDir :: [Flag] -> IO String getHaddockLibDir flags = case [str | Flag_Lib str <- flags] of @@ -347,6 +349,7 @@ getHaddockLibDir flags = #endif fs -> return (last fs) + getGhcLibDir :: [Flag] -> IO String getGhcLibDir flags = case [ dir | Flag_GhcLibDir dir <- flags ] of @@ -426,6 +429,7 @@ getInTreeLibDir = Just d -> return (d "..") #endif + getExecDir :: IO (Maybe String) #if defined(mingw32_HOST_OS) getExecDir = allocaArray len $ \buf -> do @@ -436,6 +440,7 @@ getExecDir = allocaArray len $ \buf -> do return (Just (dropFileName s)) where len = 2048 -- Plenty, PATH_MAX is 512 under Win32. + foreign import stdcall unsafe "GetModuleFileNameA" getModuleFileName :: Ptr () -> CString -> Int -> IO Int32 #else -- cgit v1.2.3