Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : type-holes-branch

http://hackage.haskell.org/trac/ghc/changeset/40b890331dfe93054f5b16c71082372d6fe3ce2d

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

commit 40b890331dfe93054f5b16c71082372d6fe3ce2d
Author: Thijs Alkemade <[email protected]>
Date:   Fri Apr 27 11:54:01 2012 +0200

    Make sure ambiguous class constraints still get deferred, otherwise it 
fails at runtime.

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

 compiler/typecheck/TcErrors.lhs |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/compiler/typecheck/TcErrors.lhs b/compiler/typecheck/TcErrors.lhs
index d353ece..b758998 100644
--- a/compiler/typecheck/TcErrors.lhs
+++ b/compiler/typecheck/TcErrors.lhs
@@ -154,9 +154,11 @@ reportTidyWanteds ctxt insols flats implics
           }
        else 
        do {
-            ; traceTc "reportTidyWanteds" (ppr deferred)
+            ; traceTc "reportTidyWanteds" (ppr $ mapBag ic_given implics)
             ; mapBagM_ (deferToRuntime ev_binds_var ctxt (mkHoleDeferredError 
deferred))
                        holes
+            ; mapBagM_ (deferToRuntime ev_binds_var ctxt mkFlatErr)
+                       (filterBag (\x -> isDeferred x && (not $ isHole x)) 
(flats `unionBags` insols))
             ; reportInsolsAndFlats ctxt (filterBag (not.isDeferred) insols) 
(filterBag (not.isDeferred) flats)
             ; mapBagM_ (reportImplic ctxt) implics
           }



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to