[commit: ghc] master: Make interface loading for COMPLETE pragmas lazy (b16239a)

git at git.haskell.org git at git.haskell.org
Thu Feb 2 04:38:19 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/b16239a95b730dd2d6fc0dbb18c8430669f2c187/ghc

>---------------------------------------------------------------

commit b16239a95b730dd2d6fc0dbb18c8430669f2c187
Author: Matthew Pickering <matthewtpickering at gmail.com>
Date:   Wed Feb 1 22:54:31 2017 -0500

    Make interface loading for COMPLETE pragmas lazy
    
    Without this additional laziness we will loop forever trying
    to find the definitions of the conlikes referenced in the pragma.
    
    Fixes #13188
    
    Reviewers: austin, RyanGlScott, bgamari
    
    Reviewed By: bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D3058
    
    GHC Trac Issues: #13188


>---------------------------------------------------------------

b16239a95b730dd2d6fc0dbb18c8430669f2c187
 compiler/iface/TcIface.hs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/compiler/iface/TcIface.hs b/compiler/iface/TcIface.hs
index f6a4f41..d2ddeb2 100644
--- a/compiler/iface/TcIface.hs
+++ b/compiler/iface/TcIface.hs
@@ -1033,8 +1033,9 @@ tcIfaceCompleteSigs :: [IfaceCompleteMatch] -> IfL [CompleteMatch]
 tcIfaceCompleteSigs = mapM tcIfaceCompleteSig
 
 tcIfaceCompleteSig :: IfaceCompleteMatch -> IfL CompleteMatch
-tcIfaceCompleteSig (IfaceCompleteMatch ms t) =
-  CompleteMatch <$> (mapM tcIfaceConLike ms) <*> tcIfaceTyConByName t
+tcIfaceCompleteSig cm@(IfaceCompleteMatch ms t) =
+  forkM (text "COMPLETE" <+> ppr cm) $
+    CompleteMatch <$> mapM tcIfaceConLike ms <*> tcIfaceTyConByName t
 
 {-
 ************************************************************************



More information about the ghc-commits mailing list