Skip to content
This repository has been archived by the owner on Apr 25, 2020. It is now read-only.

Issue #727: Don't add .hs-boot modules to context #730

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion Language/Haskell/GhcMod/Gap.hs
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,19 @@ withInteractiveContext action = gbracket setup teardown body
topImports >>= setCtx
action
topImports = do
ms <- filterM moduleIsInterpreted =<< map ms_mod <$> getModuleGraph
ms <- map ms_mod <$> (filterM includeModule =<< getModuleGraph)
let iis = map (IIModule . modName) ms
#if __GLASGOW_HASKELL__ >= 704
return iis
#else
return (iis,[])
#endif

includeModule m = do
let boot = isHsBoot (ms_hsc_src m)
interp <- moduleIsInterpreted (ms_mod m)
return $ interp && not boot

#if __GLASGOW_HASKELL__ >= 706
modName = moduleName
setCtx = setContext
Expand Down