Don't pass the same argument twice (#1708)

This commit is contained in:
Neil Mitchell 2019-06-17 14:20:51 +02:00 committed by mergify[bot]
parent e17aa608e3
commit cb7d95edac
2 changed files with 3 additions and 4 deletions

View File

@ -133,14 +133,13 @@ getPackage dflags p =
-- | Typecheck a single module using the supplied dependencies and packages.
typecheckModule
:: IdeOptions
-> ParsedModule
-> HscEnv
-> [TcModuleResult]
-> ParsedModule
-> IO ([FileDiagnostic], Maybe TcModuleResult)
typecheckModule opt mod packageState deps pm =
typecheckModule opt packageState deps pm =
fmap (either (, Nothing) (second Just)) $ Ex.runExceptT $
runGhcSessionExcept opt (Just mod) packageState $
runGhcSessionExcept opt (Just pm) packageState $
catchSrcErrors $ do
setupEnv deps
(warnings, tcm) <- withWarnings "Typechecker" $ \tweak ->

View File

@ -288,7 +288,7 @@ typeCheckRule =
setPriority PriorityTypeCheck
packageState <- use_ GhcSession ""
opt <- getOpts
liftIO $ Compile.typecheckModule opt pm packageState tms pm
liftIO $ Compile.typecheckModule opt packageState tms pm
generateCoreRule :: Rules ()