#10358: ApiAnnotations : PatBind gives wrong SrcSpan for the pattern. -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: bug | Status: patch Priority: normal | Milestone: 7.10.2 Component: Compiler | Version: 7.10.1 (Parser) | Keywords: Resolution: | ApiAnnotations Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: Phab:D873 -------------------------------------+------------------------------------- Comment (by Alan Zimmerman <alan.zimm@…>): In [changeset:"ecc3d6be218b1c7a36ee3f2f36c4f3ac4f45c34f/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="ecc3d6be218b1c7a36ee3f2f36c4f3ac4f45c34f" ApiAnnotations : PatBind gives wrong SrcSpan for the pattern. Summary: The production for decl_no_th starts decl_no_th :: { Located (OrdList (LHsDecl RdrName)) } : sigdecl { $1 } | '!' aexp rhs {% do { let { e = sLL $1 $> (SectionR (sL1 $1 (HsVar bang_RDR)) $2) }; pat <- checkPattern empty e; ... The e value should be just the pattern, excluding the rhs, but the span created includes the rhs. Test Plan: ./validate Reviewers: hvr, austin Reviewed By: austin Subscribers: bgamari, thomie, mpickering Differential Revision: https://phabricator.haskell.org/D873 GHC Trac Issues: #10358 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10358#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler