[Git][ghc/ghc][wip/cfuneqcan-refactor] 2 commits: Accommodate #18987

Richard Eisenberg gitlab at gitlab.haskell.org
Tue Nov 24 20:55:58 UTC 2020



Richard Eisenberg pushed to branch wip/cfuneqcan-refactor at Glasgow Haskell Compiler / GHC


Commits:
99b6f9fa by Richard Eisenberg at 2020-11-24T15:54:15-05:00
Accommodate #18987

- - - - -
6ae2ad19 by Richard Eisenberg at 2020-11-24T15:55:45-05:00
let-bound skolems

- - - - -


2 changed files:

- compiler/GHC/Tc/Solver/Canonical.hs
- compiler/GHC/Tc/Solver/Monad.hs


Changes:

=====================================
compiler/GHC/Tc/Solver/Canonical.hs
=====================================
@@ -710,8 +710,11 @@ canIrred ev
        ; case classifyPredType (ctEvPred new_ev) of
            ClassPred cls tys     -> canClassNC new_ev cls tys
            EqPred eq_rel ty1 ty2 -> canEqNC new_ev eq_rel ty1 ty2
-           ForAllPred {}         -> pprPanic "rewriting revealed a ForAllTy"
-                                             (ppr ev)
+           ForAllPred tvs th p   -> -- this is highly suspect; Quick Look
+                                    -- should never leave a meta-var filled
+                                    -- in with a polytype. This is #18987.
+                                    do traceTcS "canEvNC:forall" (ppr pred)
+                                       canForAllNC ev tvs th p
            IrredPred {}          -> continueWith $
                                     mkIrredCt OtherCIS new_ev } }
 


=====================================
compiler/GHC/Tc/Solver/Monad.hs
=====================================
@@ -2146,7 +2146,7 @@ getHasGivenEqs tclvl
     check_local_given_tv_eq :: Ct -> HasGivenEqs
     check_local_given_tv_eq (CEqCan { cc_lhs = TyVarLHS tv, cc_ev = ev})
       | given_here ev
-      = if is_outer_var tv then MaybeGivenEqs else LocalGivenEqs
+      = if is_outer_var tv then MaybeGivenEqs else NoGivenEqs
         -- See Note [Let-bound skolems]
       | otherwise
       = NoGivenEqs



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/65a7815c04574e49e62cc457d8476287366f62a4...6ae2ad19e581fb0ad987c6b84ac291bd138f7991

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/65a7815c04574e49e62cc457d8476287366f62a4...6ae2ad19e581fb0ad987c6b84ac291bd138f7991
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201124/de549e49/attachment.html>


More information about the ghc-commits mailing list