aboutsummaryrefslogtreecommitdiff
path: root/src/Main.hs
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2010-05-13 19:43:05 +0000
committerDavid Waern <david.waern@gmail.com>2010-05-13 19:43:05 +0000
commit4491882688176b7b587f07513ab2a3c492ab5fdb (patch)
tree4d584b04fb9991d6525738be3e531761b258c3b6 /src/Main.hs
parent481c674d426c1c6cadb80d4baabcef049b426259 (diff)
Two newlines between declarations in Main
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs5
1 files changed, 5 insertions, 0 deletions
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