• Alan Zimmerman's avatar
    ApiAnnotations : AST version of nested forall loses forall annotation · c553e980
    Alan Zimmerman authored
    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
    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
Parser.y 163 KB