summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-api/annotations/Test10278.hs
Commit message (Collapse)AuthorAgeFilesLines
* ApiAnnotations : rationalise testsAlan Zimmerman2015-06-011-1/+1
| | | | | | | | | | | | | | | | | | | | Summary: At the moment the API Annotations tests have a driver that has been copy/pasted multiple times. Compile it once, and run it for each test case. Test Plan: ./validate Reviewers: hvr, austin Reviewed By: austin Subscribers: bgamari, thomie Differential Revision: https://phabricator.haskell.org/D913 GHC Trac Issues: #10452
* ApiAnnotations : AST version of nested forall loses forall annotationAlan Zimmerman2015-05-211-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Revert "ApiAnnotations : Nested forall loses forall annotation"Austin Seipp2015-05-061-12/+0
| | | | | | This reverts commit 81030ede73c4e3783219b2a8d7463524e847cfce. Alan is abandoning this approach in favor of D836.
* ApiAnnotations : Nested forall loses forall annotationAlan Zimmerman2015-05-061-0/+12
When parsing {-# 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. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D833 GHC Trac Issues: #10278