Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
jberryman
GHC
Commits
fb3a22d8
Commit
fb3a22d8
authored
Jun 16, 2005
by
simonmar
Browse files
[project @ 2005-06-16 09:36:15 by simonmar]
Fix -optdep--exclude-module (looks like this has been broken for a while)
parent
1172cf9f
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/main/DriverMkDepend.hs
View file @
fb3a22d8
...
...
@@ -71,7 +71,7 @@ doMkDependHS session srcs
-- Prcess them one by one, dumping results into makefile
-- and complaining about cycles
;
mapM
(
processDeps
session
(
mkd_tmp_hdl
files
))
sorted
;
mapM
(
processDeps
session
excl_mods
(
mkd_tmp_hdl
files
))
sorted
-- Tidy up
;
endMkDependHS
dflags
files
}
...
...
@@ -150,6 +150,7 @@ beginMkDependHS dflags = do
-----------------------------------------------------------------
processDeps
::
Session
->
[
Module
]
->
Handle
-- Write dependencies to here
->
SCC
ModSummary
->
IO
()
...
...
@@ -168,11 +169,11 @@ processDeps :: Session
--
-- For {-# SOURCE #-} imports the "hi" will be "hi-boot".
processDeps
session
hdl
(
CyclicSCC
nodes
)
processDeps
session
excl_mods
hdl
(
CyclicSCC
nodes
)
=
-- There shouldn't be any cycles; report them
throwDyn
(
ProgramError
(
showSDoc
$
GHC
.
cyclicModuleErr
nodes
))
processDeps
session
hdl
(
AcyclicSCC
node
)
processDeps
session
excl_mods
hdl
(
AcyclicSCC
node
)
=
do
{
extra_suffixes
<-
readIORef
v_Dep_suffixes
;
hsc_env
<-
GHC
.
sessionHscEnv
session
;
include_pkg_deps
<-
readIORef
v_Dep_include_pkg_deps
...
...
@@ -200,8 +201,14 @@ processDeps session hdl (AcyclicSCC node)
;
writeDependency
hdl
obj_files
src_file
-- Emit a dependency for each import
;
mapM_
(
do_imp
True
.
unLoc
)
(
ms_srcimps
node
)
-- SOURCE imports
;
mapM_
(
do_imp
False
.
unLoc
)
(
ms_imps
node
)
-- regular imports
-- SOURCE imports
;
mapM_
(
do_imp
True
)
(
filter
(`
notElem
`
excl_mods
)
(
map
unLoc
(
ms_srcimps
node
)))
-- regular imports
;
mapM_
(
do_imp
False
)
(
filter
(`
notElem
`
excl_mods
)
(
map
unLoc
(
ms_imps
node
)))
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment