Skip to content

Parser: use left-recursion in apats and argpats

The following discussion from !11109 (closed) should be addressed:

  • !11109 (comment 521826)

    Happy works better with left-recursive grammars, so I expected to see

    argpats :: { [LArgPat GhcPs] }  -- reversed
            : argpats argpat { $2 : $1 }
            |                { [] }

    But then I noticed that apats has the same problem, and you probably simply used it as a reference.

    We should fix this at some point, but maybe not in this patch.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information