summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-api/annotations/AnnotationTuple.hs
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2015-04-14 01:17:58 -0500
committerAustin Seipp <austin@well-typed.com>2015-04-14 01:20:06 -0500
commit919b51174163907d2bc3bb41aadf56aa8bb42e9b (patch)
tree1c905ca6cd84cda9ff99ce26bf7c5dd385e2d35c /testsuite/tests/ghc-api/annotations/AnnotationTuple.hs
parent9eab6feed44ad8beb6703d2e27ce47a8f79d0f49 (diff)
downloadhaskell-919b51174163907d2bc3bb41aadf56aa8bb42e9b.tar.gz
parser : the API annotation on opt_sig is being discarded
The opt_sig production is defined as opt_sig :: { ([AddAnn],Maybe (LHsType RdrName)) } : {- empty -} { ([],Nothing) } | '::' sigtype { ([mj AnnDcolon $1],Just $2) } It is used in the alt and decl_no_th productions, but neither of them add the returned annotations. This commit captures the annotations in the calling productions. Reviewed By: austin Differential Revision: https://phabricator.haskell.org/D822 GHC Trac Issues: #10254
Diffstat (limited to 'testsuite/tests/ghc-api/annotations/AnnotationTuple.hs')
-rw-r--r--testsuite/tests/ghc-api/annotations/AnnotationTuple.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/testsuite/tests/ghc-api/annotations/AnnotationTuple.hs b/testsuite/tests/ghc-api/annotations/AnnotationTuple.hs
index 5df7cf72ef..73015a6bc5 100644
--- a/testsuite/tests/ghc-api/annotations/AnnotationTuple.hs
+++ b/testsuite/tests/ghc-api/annotations/AnnotationTuple.hs
@@ -1,5 +1,5 @@
{-# LANGUAGE TupleSections,TypeFamilies #-}
-{-# LANGUAGE PatternGuards #-}
+{-# LANGUAGE PatternGuards,ScopedTypeVariables #-}
module AnnotationTuple (foo) where
{
@@ -22,6 +22,8 @@ match n
, Just 6 <- Nothing
, Just 7 <- Just 9
= Just 8
+;
+boo :: Int = 3
}
-- Note: the trailing whitespace in this file is used to check that we
-- have an annotation for it.