X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcArrows.lhs;h=b53b5ea82156ab7d7857a9eb4302ee6a3aa8f654;hp=2316162c18a5b6193bfcf01846d1940a8b95a621;hb=e6d057711f4d6d6ff6342c39fa2b9e44d25447f1;hpb=f80b81f8b56ebd0fa0f7f82494a5090e9ab64256 diff --git a/compiler/typecheck/TcArrows.lhs b/compiler/typecheck/TcArrows.lhs index 2316162..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 (CoTyLam w_tv) + ; returnM (HsArrForm (noLoc $ HsWrap (WpTyLam w_tv) (unLoc $ mkHsDictLet inst_binds expr')) fixity cmds') }