Include the "stupid theta" in the type of $con2tag
[ghc-hetmet.git] / compiler / typecheck / TcSimplify.lhs
index 535b561..57e9125 100644 (file)
@@ -676,7 +676,7 @@ floatEqualities :: TcTyVarSet -> [EvVar]
                 -> CanonicalCts -> (CanonicalCts, CanonicalCts)
 floatEqualities skols can_given wanteds
   | hasEqualities can_given = (emptyBag, wanteds)
-  | otherwise                 = partitionBag is_floatable wanteds
+  | otherwise               = partitionBag is_floatable wanteds
   where
     is_floatable :: CanonicalCt -> Bool
     is_floatable (CTyEqCan { cc_tyvar = tv, cc_rhs = ty })
@@ -787,7 +787,8 @@ defaultTyVar untch the_tv
   , not (the_tv `elemVarSet` untch)
   , not (k `eqKind` default_k)
   = do { (ev, better_ty) <- TcSMonad.newKindConstraint (mkTyVarTy the_tv) default_k
-       ; let loc = CtLoc TypeEqOrigin (getSrcSpan the_tv) [] -- Yuk
+       ; let loc = CtLoc DefaultOrigin (getSrcSpan the_tv) [] -- Yuk
+                          -- 'DefaultOrigin' is strictly the declaration, but it's convenient
              wanted_eq  = CTyEqCan { cc_id     = ev
                                    , cc_flavor = Wanted loc
                                    , cc_tyvar  = the_tv