Merge remote-tracking branch 'kazu/master'
Conflicts: Language/Haskell/GhcMod/Check.hs Language/Haskell/GhcMod/FillSig.hs Language/Haskell/GhcMod/GHCApi.hs
This commit is contained in:
@@ -9,7 +9,8 @@ import Control.Applicative ((<$>))
|
||||
import Language.Haskell.GhcMod.DynFlags
|
||||
import qualified Language.Haskell.GhcMod.Gap as Gap
|
||||
import Language.Haskell.GhcMod.Logger
|
||||
import Language.Haskell.GhcMod.Monad
|
||||
import Language.Haskell.GhcMod.Monad (IOish, GhcModT, withErrorHandler)
|
||||
import Language.Haskell.GhcMod.Target (setTargetFiles)
|
||||
|
||||
----------------------------------------------------------------
|
||||
|
||||
@@ -19,7 +20,7 @@ checkSyntax :: IOish m
|
||||
=> [FilePath] -- ^ The target files.
|
||||
-> GhcModT m String
|
||||
checkSyntax [] = return ""
|
||||
checkSyntax files = withErrorHandler sessionName $ do
|
||||
checkSyntax files = withErrorHandler sessionName $
|
||||
either id id <$> check files
|
||||
where
|
||||
sessionName = case files of
|
||||
@@ -33,7 +34,7 @@ checkSyntax files = withErrorHandler sessionName $ do
|
||||
check :: IOish m
|
||||
=> [FilePath] -- ^ The target files.
|
||||
-> GhcModT m (Either String String)
|
||||
check fileNames = do
|
||||
check fileNames =
|
||||
withLogger (setAllWaringFlags . setNoMaxRelevantBindings) $
|
||||
setTargetFiles fileNames
|
||||
|
||||
@@ -44,7 +45,7 @@ expandTemplate :: IOish m
|
||||
=> [FilePath] -- ^ The target files.
|
||||
-> GhcModT m String
|
||||
expandTemplate [] = return ""
|
||||
expandTemplate files = withErrorHandler sessionName $ do
|
||||
expandTemplate files = withErrorHandler sessionName $
|
||||
either id id <$> expand files
|
||||
where
|
||||
sessionName = case files of
|
||||
|
||||
Reference in New Issue
Block a user