first try to resolve #322.

This commit is contained in:
Kazu Yamamoto
2014-08-18 16:55:41 +09:00
parent f799ff1ee8
commit 0fd8b9afd8
3 changed files with 19 additions and 17 deletions

View File

@@ -21,13 +21,8 @@ import Language.Haskell.GhcMod.Target (setTargetFiles)
checkSyntax :: IOish m
=> [FilePath] -- ^ The target files.
-> GhcModT m String
checkSyntax [] = return ""
checkSyntax files = withErrorHandler sessionName $
either id id <$> check files
where
sessionName = case files of
[file] -> file
_ -> "MultipleFiles"
checkSyntax [] = return ""
checkSyntax files = withErrorHandler $ either id id <$> check files
----------------------------------------------------------------
@@ -51,13 +46,8 @@ check fileNames = overrideGhcUserOptions $ \ghcOpts -> do
expandTemplate :: IOish m
=> [FilePath] -- ^ The target files.
-> GhcModT m String
expandTemplate [] = return ""
expandTemplate files = withErrorHandler sessionName $
either id id <$> expand files
where
sessionName = case files of
[file] -> file
_ -> "MultipleFiles"
expandTemplate [] = return ""
expandTemplate files = withErrorHandler $ either id id <$> expand files
----------------------------------------------------------------