[GHC] #11213: Incorrect reported pattern synonym signature
#11213: Incorrect reported pattern synonym signature -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Keywords: | Operating System: Unknown/Multiple PatternSynonyms | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{ data T where MkT :: (Show b) => b -> T --pattern ExNumPat :: () => Show b => b -> T pattern ExNumPat x = MkT x }}} GHC reports that `ExNumPat` is missing a signature (correctly) but it reports the wrong type. The correct type is the one commented out. {{{ pstest.hs:12:1: warning: Top-level binding with no type signature: ExNumPat :: forall b. Show b => b -> T }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11213> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11213: Incorrect reported pattern synonym signature -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.10.3 checker) | Keywords: Resolution: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1896 Wiki Page: | -------------------------------------+------------------------------------- Changes (by rdragon): * differential: => Phab:D1896 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11213#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11213: Incorrect reported pattern synonym signature -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 7.10.3 checker) | Keywords: Resolution: | PatternSynonyms Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1896 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Matthew Pickering <matthewtpickering@…>): In [changeset:"72bd7f7be7809076f321a6fca90024e3e1bde3cc/ghc" 72bd7f7b/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="72bd7f7be7809076f321a6fca90024e3e1bde3cc" Improve printing of pattern synonym types Add the function `pprPatSynType :: PatSyn -> SDoc` for printing pattern synonym types, and remove the ambiguous `patSynType` function. Also, the types in a `PatSyn` are now tidy. Haddock submodule updated to reflect the removal of `patSynType` by mpickering. Fixes: #11213. Reviewers: goldfire, simonpj, austin, mpickering, bgamari Reviewed By: simonpj, mpickering Subscribers: bollmann, simonpj, thomie Differential Revision: https://phabricator.haskell.org/D1896 GHC Trac Issues: #11213 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11213#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11213: Incorrect reported pattern synonym signature -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.0.1 Component: Compiler (Type | Version: 7.10.3 checker) | Keywords: Resolution: fixed | PatternSynonyms Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1896 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => closed * resolution: => fixed * milestone: => 8.0.1 @@ -1,1 +1,1 @@ - {{{ + {{{#!hs New description: {{{#!hs data T where MkT :: (Show b) => b -> T --pattern ExNumPat :: () => Show b => b -> T pattern ExNumPat x = MkT x }}} GHC reports that `ExNumPat` is missing a signature (correctly) but it reports the wrong type. The correct type is the one commented out. {{{ pstest.hs:12:1: warning: Top-level binding with no type signature: ExNumPat :: forall b. Show b => b -> T }}} -- Comment: This was merged to `ghc-8.0` as f75e098a0e3f7c81cad92e6b52f6c00a6491152d. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11213#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC