X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcUnify.lhs;h=8de9f6c6782566cbfe32533df30848917fdd56a4;hb=beab356b7fbda6281351d7edd556d2e77a351cbf;hp=4a5b2cc5e2ab382b4c4df0ec5098f6062db6723f;hpb=e975c8f09ac8d85059a4b42cf56ebe036aa95dc7;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcUnify.lhs b/compiler/typecheck/TcUnify.lhs index 4a5b2cc..8de9f6c 100644 --- a/compiler/typecheck/TcUnify.lhs +++ b/compiler/typecheck/TcUnify.lhs @@ -142,7 +142,7 @@ subFunTys error_herald n_pats res_ty thing_inside else loop n args_so_far (FunTy arg_ty' res_ty') } loop n args_so_far (TyVarTy tv) - | not (isImmutableTyVar tv) + | isTyConableTyVar tv = do { cts <- readMetaTyVar tv ; case cts of Indirect ty -> loop n args_so_far ty @@ -196,7 +196,7 @@ boxySplitTyConApp tc orig_ty = loop (n_req - 1) (arg:args_so_far) fun loop n_req args_so_far (TyVarTy tv) - | not (isImmutableTyVar tv) + | isTyConableTyVar tv = do { cts <- readMetaTyVar tv ; case cts of Indirect ty -> loop n_req args_so_far ty @@ -232,7 +232,7 @@ boxySplitAppTy orig_ty = return (fun_ty, arg_ty) loop (TyVarTy tv) - | not (isImmutableTyVar tv) + | isTyConableTyVar tv = do { cts <- readMetaTyVar tv ; case cts of Indirect ty -> loop ty @@ -721,8 +721,12 @@ tc_sub1 sub_ctxt act_sty actual_ty exp_ib exp_sty expected_ty ----------------------------------- defer_to_boxy_matching sub_ctxt act_sty actual_ty exp_ib exp_sty expected_ty = do { addSubCtxt sub_ctxt act_sty exp_sty $ - u_tys True False act_sty actual_ty exp_ib exp_sty expected_ty + u_tys outer False act_sty actual_ty exp_ib exp_sty expected_ty ; return idHsWrapper } + where + outer = case sub_ctxt of -- Ugh + SubDone -> False + other -> True ----------------------------------- tc_sub_funs act_arg act_res exp_ib exp_arg exp_res