Commit 384c3864 authored by Simon Peyton Jones's avatar Simon Peyton Jones

Get rid of now-outdated zonkTypeCarefully

parent 78e2beb5
......@@ -371,7 +371,7 @@ tcPolyNoGen tc_sig_fn prag_fn rec_tc bind_list
; return (binds', mono_ids', NotTopLevel) }
where
tc_mono_info (name, _, mono_id)
= do { mono_ty' <- zonkTcTypeCarefully (idType mono_id)
= do { mono_ty' <- zonkTcType (idType mono_id)
-- Zonk, mainly to expose unboxed types to checkStrictBinds
; let mono_id' = setIdType mono_id mono_ty'
; _specs <- tcSpecPrags mono_id' (prag_fn name)
......@@ -471,7 +471,7 @@ mkExport :: PragFun
-- Pre-condition: the qtvs and theta are already zonked
mkExport prag_fn qtvs theta (poly_name, mb_sig, mono_id)
= do { mono_ty <- zonkTcTypeCarefully (idType mono_id)
= do { mono_ty <- zonkTcType (idType mono_id)
; let inferred_poly_ty = mkSigmaTy my_tvs theta mono_ty
my_tvs = filter (`elemVarSet` used_tvs) qtvs
used_tvs = tyVarsOfTypes theta `unionVarSet` tyVarsOfType mono_ty
......
......@@ -892,7 +892,7 @@ tcInferFun fun
-- Zonk the function type carefully, to expose any polymorphism
-- E.g. (( \(x::forall a. a->a). blah ) e)
-- We can see the rank-2 type of the lambda in time to genrealise e
; fun_ty' <- zonkTcTypeCarefully fun_ty
; fun_ty' <- zonkTcType fun_ty
; (wrap, rho) <- deeplyInstantiate AppOrigin fun_ty'
; return (mkLHsWrap wrap fun, rho) }
......
......@@ -275,21 +275,9 @@ checkUnboxedTuple :: TcType -> SDoc -> TcM ()
-- (This shows up as a (more obscure) kind error
-- in the 'otherwise' case of tcMonoBinds.)
checkUnboxedTuple ty what
= do { zonked_ty <- zonkTcTypeCarefully ty
= do { zonked_ty <- zonkTcType ty
; checkTc (not (isUnboxedTupleType zonked_ty))
(unboxedTupleErr what zonked_ty) }
-------------------
{- Only needed if we re-add Method constraints
bindInstsOfPatId :: TcId -> TcM a -> TcM (a, TcEvBinds)
bindInstsOfPatId id thing_inside
| not (isOverloadedTy (idType id))
= do { res <- thing_inside; return (res, emptyTcEvBinds) }
| otherwise
= do { (res, lie) <- captureConstraints thing_inside
; binds <- bindLocalMethods lie [id]
; return (res, binds) }
-}
\end{code}
Note [Polymorphism and pattern bindings]
......
Markdown is supported
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