- { ((arg_pats', inner_tvs, res), lie_req)
- <- getLIE (tcConArgs ctxt data_con arg_pats arg_tys' thing_inside)
+ { ((arg_pats', inner_tvs, res), lie_req) <- getLIE $
+ do { tcInstStupidTheta data_con tv_tys'
+ -- The stupid-theta mentions the newly-bound tyvars, so
+ -- it must live inside the getLIE, so that the
+ -- tcSimplifyCheck will apply the type refinement to it
+ ; tcConArgs ctxt data_con arg_pats arg_tys' thing_inside }