[commit: ghc] master: Don't prematurely force TyThing thunks with -ddump-if-trace. (da105ca)
git at git.haskell.org
git at git.haskell.org
Thu May 12 02:52:36 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/da105ca104f8382c33c01050dd04443c9c2d63ea/ghc
>---------------------------------------------------------------
commit da105ca104f8382c33c01050dd04443c9c2d63ea
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date: Tue May 10 00:14:05 2016 -0700
Don't prematurely force TyThing thunks with -ddump-if-trace.
Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, austin, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2187
>---------------------------------------------------------------
da105ca104f8382c33c01050dd04443c9c2d63ea
compiler/iface/TcIface.hs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/compiler/iface/TcIface.hs b/compiler/iface/TcIface.hs
index 25fa227..9a4a5c7 100644
--- a/compiler/iface/TcIface.hs
+++ b/compiler/iface/TcIface.hs
@@ -144,7 +144,10 @@ typecheckIface iface
-- Finished
; traceIf (vcat [text "Finished typechecking interface for" <+> ppr (mi_module iface),
- text "Type envt:" <+> ppr type_env])
+ -- Careful! If we tug on the TyThing thunks too early
+ -- we'll infinite loop with hs-boot. See #10083 for
+ -- an example where this would cause non-termination.
+ text "Type envt:" <+> ppr (map fst names_w_things)])
; return $ ModDetails { md_types = type_env
, md_insts = insts
, md_fam_insts = fam_insts
More information about the ghc-commits
mailing list