Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
896d216d
Commit
896d216d
authored
Jun 19, 2016
by
Edward Z. Yang
Browse files
Annotate initIfaceCheck with usage information.
Signed-off-by:
Edward Z. Yang
<
ezyang@cs.stanford.edu
>
parent
b2c5e4ce
Changes
6
Hide whitespace changes
Inline
Side-by-side
compiler/ghci/Linker.hs
View file @
896d216d
...
...
@@ -610,7 +610,7 @@ getLinkDeps hsc_env hpt pls replace_osuf span mods
=
return
(
uniqDSetToList
acc_mods
,
uniqDSetToList
acc_pkgs
)
follow_deps
(
mod
:
mods
)
acc_mods
acc_pkgs
=
do
mb_iface
<-
initIfaceCheck
hsc_env
$
mb_iface
<-
initIfaceCheck
(
text
"getLinkDeps"
)
hsc_env
$
loadInterface
msg
mod
(
ImportByUser
False
)
iface
<-
case
mb_iface
of
Maybes
.
Failed
err
->
throwGhcExceptionIO
(
ProgramError
(
showSDoc
dflags
err
))
...
...
compiler/iface/MkIface.hs
View file @
896d216d
...
...
@@ -952,7 +952,7 @@ checkOldIface hsc_env mod_summary source_modified maybe_iface
showPass
dflags
$
"Checking old interface for "
++
(
showPpr
dflags
$
ms_mod
mod_summary
)
initIfaceCheck
hsc_env
$
initIfaceCheck
(
text
"checkOldIface"
)
hsc_env
$
check_old_iface
hsc_env
mod_summary
source_modified
maybe_iface
check_old_iface
...
...
compiler/main/GhcMake.hs
View file @
896d216d
...
...
@@ -1422,7 +1422,7 @@ typecheckLoop dflags hsc_env mods = do
new_hpt
<-
fixIO
$
\
new_hpt
->
do
let
new_hsc_env
=
hsc_env
{
hsc_HPT
=
new_hpt
}
mds
<-
initIfaceCheck
new_hsc_env
$
mds
<-
initIfaceCheck
(
text
"typecheckLoop"
)
new_hsc_env
$
mapM
(
typecheckIface
.
hm_iface
)
hmis
let
new_hpt
=
addListToHpt
old_hpt
(
zip
mods
[
hmi
{
hm_details
=
details
}
...
...
compiler/main/HscMain.hs
View file @
896d216d
...
...
@@ -739,7 +739,7 @@ genModDetails :: HscEnv -> ModIface -> IO ModDetails
genModDetails
hsc_env
old_iface
=
do
new_details
<-
{-# SCC "tcRnIface" #-}
initIfaceCheck
hsc_env
(
typecheckIface
old_iface
)
initIfaceCheck
(
text
"genModDetails"
)
hsc_env
(
typecheckIface
old_iface
)
dumpIfaceStats
hsc_env
return
new_details
...
...
compiler/typecheck/TcRnMonad.hs
View file @
896d216d
...
...
@@ -1619,15 +1619,15 @@ initIfaceTcRn thing_inside
;
get_type_env
=
readTcRef
(
tcg_type_env_var
tcg_env
)
}
;
setEnvs
(
if_env
,
()
)
thing_inside
}
initIfaceCheck
::
HscEnv
->
IfG
a
->
IO
a
initIfaceCheck
::
SDoc
->
HscEnv
->
IfG
a
->
IO
a
-- Used when checking the up-to-date-ness of the old Iface
-- Initialise the environment with no useful info at all
initIfaceCheck
hsc_env
do_this
initIfaceCheck
doc
hsc_env
do_this
=
do
let
rec_types
=
case
hsc_type_env_var
hsc_env
of
Just
(
mod
,
var
)
->
Just
(
mod
,
readTcRef
var
)
Nothing
->
Nothing
gbl_env
=
IfGblEnv
{
if_doc
=
text
"initIfaceCheck"
,
if_doc
=
text
"initIfaceCheck"
<+>
doc
,
if_rec_types
=
rec_types
}
initTcRnIf
'i'
hsc_env
gbl_env
()
do_this
...
...
ghc/Main.hs
View file @
896d216d
...
...
@@ -891,7 +891,7 @@ abiHash strs = do
mods
<-
mapM
find_it
strs
let
get_iface
modl
=
loadUserInterface
False
(
text
"abiHash"
)
modl
ifaces
<-
initIfaceCheck
hsc_env
$
mapM
get_iface
mods
ifaces
<-
initIfaceCheck
(
text
"abiHash"
)
hsc_env
$
mapM
get_iface
mods
bh
<-
openBinMem
(
3
*
1024
)
-- just less than a block
put_
bh
hiVersion
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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