diff --git a/src/Development/IDE/Core/Compile.hs b/src/Development/IDE/Core/Compile.hs index f02d5eca6..6780c3f8d 100644 --- a/src/Development/IDE/Core/Compile.hs +++ b/src/Development/IDE/Core/Compile.hs @@ -69,9 +69,10 @@ parseModule -> Maybe SB.StringBuffer -> IO ([FileDiagnostic], Maybe ParsedModule) parseModule IdeOptions{..} env file = + let env' = env { hsc_dflags = hsc_dflags env `gopt_set` Opt_Haddock } in fmap (either (, Nothing) (second Just)) . -- We need packages since imports fail to resolve otherwise. - runGhcEnv env . runExceptT . parseFileContents optPreprocessor file + runGhcEnv env' . runExceptT . parseFileContents optPreprocessor file -- | Given a package identifier, what packages does it depend on diff --git a/test/exe/Main.hs b/test/exe/Main.hs index f3647f685..5526f8fd7 100644 --- a/test/exe/Main.hs +++ b/test/exe/Main.hs @@ -1183,7 +1183,7 @@ findDefinitionAndHoverTests = let , test yes yes mclL36 mcl "top-level fn 1st clause" , test yes yes mclL37 mcl "top-level fn 2nd clause #246" , test yes yes spaceL37 space "top-level fn on space #315" - , test no broken docL41 doc "documentation #7" + , test no yes docL41 doc "documentation #7" , test no yes eitL40 kindE "kind of Either #273" , test no yes intL40 kindI "kind of Int #273" , test no broken tvrL40 kindV "kind of (* -> *) type variable #273"