-
- returnTc (NPat lit' pat_ty (HsApp (HsVar (instToId eq)) over_lit_expr),
- lie1 `plusLIE` unitLIE eq,
+ (case mb_neg of
+ Nothing -> returnNF_Tc (pos_lit_expr, emptyLIE) -- Positive literal
+ Just neg -> -- Negative literal
+ -- The 'negate' is re-mappable syntax
+ tcLookupId neg `thenNF_Tc` \ neg_sel_id ->
+ newMethod origin neg_sel_id [pat_ty] `thenNF_Tc` \ neg ->
+ returnNF_Tc (HsApp (HsVar (instToId neg)) pos_lit_expr, unitLIE neg)
+ ) `thenNF_Tc` \ (lit_expr, lie2) ->
+
+ returnTc (NPat lit' pat_ty (HsApp (HsVar (instToId eq)) lit_expr),
+ lie1 `plusLIE` lie2 `plusLIE` unitLIE eq,