Commit 7b13d210 authored by simonpj@microsoft.com's avatar simonpj@microsoft.com
Browse files

De-polymorphise

parent c800c163
...@@ -214,11 +214,10 @@ tc_cmd env cmd@(HsLam (MatchGroup [L mtch_loc (match@(Match pats _maybe_rhs_sig ...@@ -214,11 +214,10 @@ tc_cmd env cmd@(HsLam (MatchGroup [L mtch_loc (match@(Match pats _maybe_rhs_sig
tc_cmd env cmd@(HsDo do_or_lc stmts body _ty) (cmd_stk, res_ty) tc_cmd env cmd@(HsDo do_or_lc stmts body _ty) (cmd_stk, res_ty)
= do { checkTc (null cmd_stk) (nonEmptyCmdStkErr cmd) = do { checkTc (null cmd_stk) (nonEmptyCmdStkErr cmd)
; (stmts', body') <- tcStmts do_or_lc tc_stmt stmts res_ty $ ; (stmts', body') <- tcStmts do_or_lc (tcMDoStmt tc_rhs) stmts res_ty $
tcGuardedCmd env body [] tcGuardedCmd env body []
; return (HsDo do_or_lc stmts' body' res_ty) } ; return (HsDo do_or_lc stmts' body' res_ty) }
where where
tc_stmt = tcMDoStmt tc_rhs
tc_rhs rhs = do { ty <- newFlexiTyVarTy liftedTypeKind tc_rhs rhs = do { ty <- newFlexiTyVarTy liftedTypeKind
; rhs' <- tcCmd env rhs ([], ty) ; rhs' <- tcCmd env rhs ([], ty)
; return (rhs', ty) } ; return (rhs', ty) }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment