- bindSigTyVarsFV (sig_fn plain_name) $ do
- (new_matches, fvs) <- mapFvRn (rn_match plain_name) matches
- let
- new_group = MatchGroup new_matches placeHolderType
-
- checkPrecMatch inf plain_name new_group
- return (unitBag (L loc (FunBind {
- fun_id = sel_name, fun_infix = inf,
- fun_matches = new_group,
- bind_fvs = fvs, fun_co_fn = idHsWrapper,
- fun_tick = Nothing })),
+ (new_matches, fvs) <- bindSigTyVarsFV (sig_fn plain_name) $
+ mapFvRn (rn_match (FunRhs plain_name is_infix)) matches
+ let new_group = MatchGroup new_matches placeHolderType
+
+ when is_infix $ checkPrecMatch plain_name new_group
+ return (unitBag (L loc (bind { fun_id = sel_name
+ , fun_matches = new_group
+ , bind_fvs = fvs })),