Opened 12 months ago

Closed 3 months ago

#12931 closed bug (fixed)

tc_infer_args does not set in-scope set correctly

Reported by: johnleo Owned by: goldfire
Priority: normal Milestone:
Component: Compiler Version: 8.0.1
Keywords: TypeInType Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: #12549 #11371 #12785 Differential Rev(s):
Wiki Page:

Description

As noted in https://ghc.haskell.org/trac/ghc/ticket/12785#comment:6, TcHsType.tc_infer_args does not set its in-scope set correctly, which means the call to TcMType.new_meta_tv_x will fail if substTyUnchecked is replaced by substTy in the line

kind   = substTyUnchecked subst (tyVarKind tv)

This is the only known caller of new_meta_tv_x to not set the in-scope set, now that #12549 has been fixed. Once this bug is fixed, change substTyUnchecked back to substTy in the line noted above.

Note that other calls to substTyUnchecked that need to be converted to substTy are covered in the general ticket #11371.

Change History (2)

comment:1 Changed 12 months ago by simonpj

Keywords: TypeInType added

Richard, may be you can look at this in due course? tc_infer_args is (uncomfortably) a mystery to me.

comment:2 Changed 3 months ago by goldfire

Resolution: fixed
Status: newclosed

This has been fixed with the recent refactoring of tc_infer_args (791947db6db32ef7d4772a821a0823e558e3c05b).

Note: See TracTickets for help on using tickets.