#14719: Caret diagnostics for GADT constructor error message don't span the whole constructor -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Poor/confusing | Unknown/Multiple error message | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D4344 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"59fa7b32b018a91f81773ca676251a0b2761ef56/ghc" 59fa7b32/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="59fa7b32b018a91f81773ca676251a0b2761ef56" Fix #14719 by using the setting the right SrcSpan Currently, error messages that germane to GADT constructors put the source span at only the first character in the constructor, leading to insufficient caret diagnostics. This can be easily fixed by using a source span that spans the entire constructor, instead of just the first character. Test Plan: make test TEST=T14719 Reviewers: alanz, bgamari, simonpj Reviewed By: alanz, simonpj Subscribers: simonpj, goldfire, rwbarton, thomie, carter GHC Trac Issues: #14719 Differential Revision: https://phabricator.haskell.org/D4344 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14719#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler