Separating IO and Ghc.

This commit is contained in:
Kazu Yamamoto
2013-05-20 11:29:44 +09:00
parent f2f3b120af
commit 849c308e5c
17 changed files with 70 additions and 75 deletions

View File

@@ -12,12 +12,12 @@ import Prelude
----------------------------------------------------------------
checkSyntax :: Options -> Cradle -> String -> Ghc String
checkSyntax opt cradle file = unlines <$> check opt cradle file
checkSyntax :: Options -> Cradle -> FilePath -> IO String
checkSyntax opt cradle file = unlines <$> withGHC file (check opt cradle file)
----------------------------------------------------------------
check :: Options -> Cradle -> String -> Ghc [String]
check :: Options -> Cradle -> FilePath -> Ghc [String]
check opt cradle fileName = checkIt `gcatch` handleErrMsg
where
checkIt = do