X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcArrows.lhs;h=b53b5ea82156ab7d7857a9eb4302ee6a3aa8f654;hp=b4afcaf30ac4fe2b630ebc8c27ef8132ebc0d86c;hb=e6d057711f4d6d6ff6342c39fa2b9e44d25447f1;hpb=3e83dfb21b2f2220dce97427fff5c19459ae68d1 diff --git a/compiler/typecheck/TcArrows.lhs b/compiler/typecheck/TcArrows.lhs index b4afcaf..b53b5ea 100644 --- a/compiler/typecheck/TcArrows.lhs +++ b/compiler/typecheck/TcArrows.lhs @@ -101,7 +101,7 @@ tcGuardedCmd :: CmdEnv -> LHsExpr Name -> CmdStack tcGuardedCmd env expr stk (reft, res_ty) = do { let (co, res_ty') = refineResType reft res_ty ; body <- tcCmd env expr (stk, res_ty') - ; return (mkLHsCoerce co body) } + ; return (mkLHsWrap co body) } tcCmd :: CmdEnv -> LHsExpr Name -> (CmdStack, TcTauType) -> TcM (LHsExpr TcId) -- The main recursive function @@ -264,7 +264,7 @@ tc_cmd env cmd@(HsArrForm expr fixity cmd_args) (cmd_stk, res_ty) -- the s1..sm and check each cmd ; cmds' <- mapM (tc_cmd w_tv) cmds_w_tys - ; returnM (HsArrForm (noLoc $ HsCoerce (CoTyLams [w_tv]) + ; returnM (HsArrForm (noLoc $ HsWrap (WpTyLam w_tv) (unLoc $ mkHsDictLet inst_binds expr')) fixity cmds') }