Add missing kind cast to pure unifier.
authorRichard Eisenberg <eir@cis.upenn.edu>
Sat, 30 Jan 2016 21:49:22 +0000 (16:49 -0500)
committerRichard Eisenberg <eir@cis.upenn.edu>
Wed, 17 Feb 2016 18:16:01 +0000 (13:16 -0500)
compiler/types/Unify.hs

index 89b6695..fe77370 100644 (file)
@@ -788,7 +788,7 @@ uVar tv1 ty kco
                                 -- this is because the range of the subst is the target
                                 -- type, not the template type. So, just check for
                                 -- normal type equality.
-                                guard (ty' `eqType` ty) }
+                                guard ((ty' `mkCastTy` kco) `eqType` ty) }
           Nothing  -> uUnrefined tv1 ty ty kco } -- No, continue
 
 uUnrefined :: TyVar             -- variable to be unified