- = do { let gbl_env = IfGblEnv { if_rec_types = Nothing }
- ; initTcRnIf 'i' hsc_env gbl_env () do_this
- }
+ = do let rec_types = case hsc_type_env_var hsc_env of
+ Just (mod,var) -> Just (mod, readMutVar var)
+ Nothing -> Nothing
+ gbl_env = IfGblEnv { if_rec_types = rec_types }
+ initTcRnIf 'i' hsc_env gbl_env () do_this