Param -> Types.

This commit is contained in:
Kazu Yamamoto
2010-04-30 18:36:31 +09:00
parent 17a97aa1dd
commit 5c4ded0630
11 changed files with 36 additions and 41 deletions

18
Types.hs Normal file
View File

@@ -0,0 +1,18 @@
module Types where
import Exception
import GHC
import GHC.Paths (libdir)
data Options = Options {
convert :: [String] -> String
}
withGHC :: Ghc [String] -> IO [String]
withGHC body = ghandle ignore $ runGhc (Just libdir) body
where
ignore :: SomeException -> IO [String]
ignore _ = return []
initSession0 :: Ghc [PackageId]
initSession0 = getSessionDynFlags >>= setSessionDynFlags