From: simonpj@microsoft.com Date: Wed, 11 Aug 2010 14:35:55 +0000 (+0000) Subject: Remember to zonk FlatSkols! X-Git-Tag: 2010-11-18~391 X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=9d193eceb5f287ac3dfa90b40e22d9c992cf9f66 Remember to zonk FlatSkols! --- diff --git a/compiler/typecheck/TcMType.lhs b/compiler/typecheck/TcMType.lhs index 492cbf9..d5c794b 100644 --- a/compiler/typecheck/TcMType.lhs +++ b/compiler/typecheck/TcMType.lhs @@ -946,14 +946,14 @@ zonkType unbound_var_fn ty zonk_tc_tyvar :: (TcTyVar -> TcM Type) -- What to do for an unbound mutable var -> TcTyVar -> TcM TcType zonk_tc_tyvar unbound_var_fn tyvar - | not (isMetaTyVar tyvar) -- Skolems - = return (TyVarTy tyvar) - - | otherwise -- Mutables - = do { cts <- readMetaTyVar tyvar - ; case cts of - Flexi -> unbound_var_fn tyvar -- Unbound meta type variable - Indirect ty -> zonkType unbound_var_fn ty } + = ASSERT( isTcTyVar tyvar ) + case tcTyVarDetails tyvar of + SkolemTv {} -> return (TyVarTy tyvar) + FlatSkol ty -> zonkType unbound_var_fn ty + MetaTv _ ref -> do { cts <- readMutVar ref + ; case cts of + Flexi -> unbound_var_fn tyvar + Indirect ty -> zonkType unbound_var_fn ty } -- Zonk the kind of a non-TC tyvar in case it is a coercion variable (their -- kind contains types).