- -- Technically, this should only be used for bang patterns,
- -- but we can be a little more liberal here and avoid parens
- -- inside tuples
- | infixexp qop { LL $ SectionL $1 $2 }
+
+ -- Note [Parsing sections]
+ -- ~~~~~~~~~~~~~~~~~~~~~~~
+ -- We include left and right sections here, which isn't
+ -- technically right according to Haskell 98. For example
+ -- (3 +, True) isn't legal
+ -- However, we want to parse bang patterns like
+ -- (!x, !y)
+ -- and it's convenient to do so here as a section
+ -- Then when converting expr to pattern we unravel it again
+ -- Meanwhile, the renamer checks that real sections appear
+ -- inside parens.
+ | infixexp qop { LL $ SectionL $1 $2 }