Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
83dedf64
Commit
83dedf64
authored
May 05, 2011
by
dterei
Browse files
SafeHaskell: Fix recompilation avoidance to take Safe into account.
parent
3a8df611
Changes
3
Hide whitespace changes
Inline
Side-by-side
compiler/iface/IfaceSyn.lhs
View file @
83dedf64
...
...
@@ -341,7 +341,7 @@ and suppose we are compiling module X:
data T = ...
instance C S T where ...
If we base the instance verion on T, I'm worried that changing S to S'
If we base the instance ver
s
ion on T, I'm worried that changing S to S'
would change T's version, but not S or S'. But an importing module might
not depend on T, and so might not be recompiled even though the new instance
(C S' T) might be relevant. I have not been able to make a concrete example,
...
...
compiler/iface/MkIface.lhs
View file @
83dedf64
...
...
@@ -298,8 +298,6 @@ mkIface_ hsc_env maybe_old_fingerprint
then return ( errs_and_warns, Nothing )
else do {
-- XXX ; when (dopt Opt_D_dump_hi_diffs dflags) (printDump pp_diffs)
-- Debug printing
; dumpIfSet_dyn dflags Opt_D_dump_hi "FINAL INTERFACE"
(pprModIface new_iface)
...
...
@@ -520,9 +518,13 @@ addFingerprints hsc_env mb_old_fingerprint iface0 new_decls
(mi_exports iface0,
orphan_hash,
dep_orphan_hashes,
dep_pkgs (mi_deps iface0)
)
dep_pkgs (mi_deps iface0)
,
-- dep_pkgs: see "Package Version Changes" on
-- wiki/Commentary/Compiler/RecompilationAvoidance
mi_trust iface0)
-- TODO: Can probably make more fine grained. Only
-- really need to have recompilation for overlapping
-- instances.
-- put the declarations in a canonical order, sorted by OccName
let sorted_decls = Map.elems $ Map.fromList $
...
...
compiler/utils/Binary.hs
View file @
83dedf64
...
...
@@ -435,6 +435,15 @@ instance (Binary a, Binary b, Binary c, Binary d) => Binary (a,b,c,d) where
d
<-
get
bh
return
(
a
,
b
,
c
,
d
)
instance
(
Binary
a
,
Binary
b
,
Binary
c
,
Binary
d
,
Binary
e
)
=>
Binary
(
a
,
b
,
c
,
d
,
e
)
where
put_
bh
(
a
,
b
,
c
,
d
,
e
)
=
do
put_
bh
a
;
put_
bh
b
;
put_
bh
c
;
put_
bh
d
;
put_
bh
e
;
get
bh
=
do
a
<-
get
bh
b
<-
get
bh
c
<-
get
bh
d
<-
get
bh
e
<-
get
bh
return
(
a
,
b
,
c
,
d
,
e
)
instance
Binary
a
=>
Binary
(
Maybe
a
)
where
put_
bh
Nothing
=
putByte
bh
0
put_
bh
(
Just
a
)
=
do
putByte
bh
1
;
put_
bh
a
...
...
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