
#10358: ApiAnnotations : PatBind gives wrong SrcSpan for the pattern. -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: bug | Status: new Priority: normal | Milestone: 7.10.2 Component: Compiler | Version: 7.10.1 (Parser) | Operating System: Unknown/Multiple Keywords: | Type of failure: None/Unknown ApiAnnotations | Blocked By: Architecture: | Related Tickets: Unknown/Multiple | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- 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`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10358 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler