[GHC] #10558: Alter type of parseDeclaration and parseTypeSignature entry points

#10558: Alter type of parseDeclaration and parseTypeSignature entry points -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: Phab: | D1007 | -------------------------------------+------------------------------------- Currently the type of the two mentioned entry points is {{{#!hs parseDeclaration :: P (OrdList (LHsDecl RdrName)) }}} and {{{#!hs parseTypeSignature :: P (Located (OrdList (LHsDecl RdrName))) }}} It turns out that in both cases, OrdList is always a singleton so the additional wrapping is redundant. I propose that the parser is modified in order to reflect this so that this is clearer to end users. The end result being that both entry points have type `P (LHsDecl RdrName)` -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10558 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10558: Alter type of parseDeclaration and parseTypeSignature entry points -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: Phab: | D1007 -------------------------------------+------------------------------------- Changes (by mpickering): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10558#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10558: Alter type of parseDeclaration and parseTypeSignature entry points -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: Phab: | D1007 -------------------------------------+------------------------------------- Comment (by mpickering): It might also be good to add a bit more documentation describing precisely what each of the parses does. For example, `parseTypeSignature` actually corresponds to `sigdecl` which is the rule for all signatures rather than just specifically type signatures. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10558#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10558: Alter type of parseDeclaration and parseTypeSignature entry points -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: Phab: | D1007 -------------------------------------+------------------------------------- Comment (by simonpj): Simplifying the type and adding documentation: both good with me! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10558#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10558: Alter type of parseDeclaration and parseTypeSignature entry points -------------------------------------+------------------------------------- Reporter: mpickering | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: Phab: | D1007 -------------------------------------+------------------------------------- Changes (by mpickering): * status: patch => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10558#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC