[GHC] #10363: ApiAnnotations : HsForAllTy discards parens
#10363: ApiAnnotations : HsForAllTy discards parens -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: bug | Status: new Priority: normal | Milestone: 7.10.2 Component: Compiler | Version: 7.10.1 Keywords: | Operating System: Unknown/Multiple ApiAnnotations | Type of failure: None/Unknown Architecture: | Blocked By: Unknown/Multiple | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- The annotations for the following code {{{#!hs pTokenCostStr :: forall a .((Show a) => [a] -> Int -> String) }}} have detached annotations for the parens around `(Show a)... String`. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10363> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10363: ApiAnnotations : HsForAllTy discards parens -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: bug | Status: new Priority: normal | Milestone: 7.10.2 Component: Compiler | Version: 7.10.1 Resolution: | Keywords: Operating System: Unknown/Multiple | ApiAnnotations Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: | Test Case: #10315,#10354,#10278 | Blocking: | Differential Revisions: Phab:D836 -------------------------------------+------------------------------------- Changes (by alanz): * differential: => Phab:D836 * related: => #10315,#10354,#10278 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10363#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10363: ApiAnnotations : HsForAllTy discards parens -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: bug | Status: closed Priority: normal | Milestone: 7.10.2 Component: Compiler | Version: 7.10.1 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | ApiAnnotations Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: | Test Case: #10315,#10354,#10278 | Blocking: | Differential Revisions: Phab:D836 -------------------------------------+------------------------------------- Changes (by alanz): * status: new => closed * resolution: => duplicate -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10363#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10363: ApiAnnotations : HsForAllTy discards parens -------------------------------------+------------------------------------- Reporter: alanz | Owner: alanz Type: bug | Status: closed Priority: normal | Milestone: 7.10.2 Component: Compiler | Version: 7.10.1 Resolution: duplicate | Keywords: Operating System: Unknown/Multiple | ApiAnnotations Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: | Test Case: #10315,#10354,#10278 | Blocking: | Differential Revisions: Phab:D836 -------------------------------------+------------------------------------- Comment (by Alan Zimmerman <alan.zimm@…>): In [changeset:"c553e980e4a5d149af13bb705ec02819a15937ee/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="c553e980e4a5d149af13bb705ec02819a15937ee" ApiAnnotations : AST version of nested forall loses forall annotation Summary: When parsing {-# LANGUAGE ScopedTypeVariables #-} extremumNewton :: forall tag. forall tag1. tag -> tag1 -> Int extremumNewton = undefined the parser creates nested HsForAllTy's for the two forall statements. These get flattened into a single one in `HsTypes.mk_forall_ty` This patch removes the flattening, so that API Annotations are not lost in the process. Test Plan: ./validate Reviewers: goldfire, austin, simonpj Reviewed By: simonpj Subscribers: bgamari, mpickering, thomie, goldfire Differential Revision: https://phabricator.haskell.org/D836 GHC Trac Issues: #10278, #10315, #10354, #10363 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10363#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC