diff options
Diffstat (limited to 'compiler/parser/Parser.y')
-rw-r--r-- | compiler/parser/Parser.y | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/parser/Parser.y b/compiler/parser/Parser.y index dead15bbb3..a640bcb849 100644 --- a/compiler/parser/Parser.y +++ b/compiler/parser/Parser.y @@ -2241,10 +2241,12 @@ hpc_annot :: { Located ( (([AddAnn],SourceText),(StringLiteral,(Int,Int),(Int,In } fexp :: { LHsExpr RdrName } - : fexp aexp { sLL $1 $> $ HsApp $1 $2 } - | 'static' aexp {% ams (sLL $1 $> $ HsStatic $2) - [mj AnnStatic $1] } - | aexp { $1 } + : fexp aexp { sLL $1 $> $ HsApp $1 $2 } + | fexp TYPEAPP atype {% ams (sLL $1 $> $ HsAppType $1 (mkHsWildCardBndrs $3)) + [mj AnnAt $2] } + | 'static' aexp {% ams (sLL $1 $> $ HsStatic $2) + [mj AnnStatic $1] } + | aexp { $1 } aexp :: { LHsExpr RdrName } : qvar '@' aexp {% ams (sLL $1 $> $ EAsPat $1 $3) [mj AnnAt $2] } @@ -2252,7 +2254,6 @@ aexp :: { LHsExpr RdrName } -- Note [Lexing type applications] in Lexer.x | '~' aexp {% ams (sLL $1 $> $ ELazyPat $2) [mj AnnTilde $1] } - | TYPEAPP atype {% ams (sLL $1 $> $ HsType (mkHsWildCardBndrs $2)) [mj AnnAt $1] } | aexp1 { $1 } aexp1 :: { LHsExpr RdrName } |