[GHC] #10278: ApiAnnotations : Nested forall loses forall annotation

GHC ghc-devs at haskell.org
Thu Apr 9 09:08:34 UTC 2015


#10278: ApiAnnotations : Nested forall loses forall annotation
-------------------------------------+-------------------------------------
              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:              |
-------------------------------------+-------------------------------------
 When parsing

 {{{#!hs
 {-# LANGUAGE ScopedTypeVariables #-}

 extremumNewton :: forall tag. forall tag1.
                    tag -> tag1 -> Int
 extremumNewton = undefined
 }}}

 The parser attaches an `AnnForall` to the second `forall`, which appears
 as a nested `HsForAllTy`.

 Somewhere this nesting is flattened, and the tyvarbndrs are collapsed into
 a single `HsForAllTy`. In this process the second `AnnForAll` loses its
 anchor in the AST.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10278>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list