+
+
+zonkMonoBinds te ve (AbsBinds tyvars dicts exports val_bind)
+ = mapNF_Tc zonkTcTyVarToTyVar tyvars `thenNF_Tc` \ new_tyvars ->
+ let
+ new_te = extend_te te new_tyvars
+ in
+ mapNF_Tc (zonkIdBndr new_te) dicts `thenNF_Tc` \ new_dicts ->
+
+ let
+ ve1 = extend_ve ve new_dicts
+ in
+ fixNF_Tc (\ ~(_, _, ve2) ->
+ zonkMonoBinds new_te ve2 val_bind `thenNF_Tc` \ (new_val_bind, new_ids) ->
+ mapNF_Tc (zonkExport new_te ve2) exports `thenNF_Tc` \ new_exports ->
+ returnNF_Tc (new_val_bind, new_exports, extend_ve ve1 new_ids)
+ ) `thenNF_Tc ` \ (new_val_bind, new_exports, _) ->
+
+ let
+ new_globals = [global | (_, global, local) <- new_exports]
+ in
+ returnNF_Tc (AbsBinds new_tyvars new_dicts new_exports new_val_bind,
+ new_globals)
+
+ where
+ zonkExport te ve (tyvars, global, local)
+ = mapNF_Tc zonkTcTyVarToTyVar tyvars `thenNF_Tc` \ new_tyvars ->
+ zonkIdBndr te global `thenNF_Tc` \ new_global ->
+ returnNF_Tc (new_tyvars, new_global, zonkIdOcc ve local)