summaryrefslogtreecommitdiff
path: root/compiler/parser
diff options
context:
space:
mode:
authorAlan Zimmerman <alan.zimm@gmail.com>2019-02-02 16:29:05 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2019-02-08 11:00:22 -0500
commit5e9888bd9c22a1315a703f638591b50e657317c4 (patch)
tree5510eb74b731855569b38480df2af673680c09c6 /compiler/parser
parentcbfc9fcaa33c3b341830962906543dfca1dfedd7 (diff)
downloadhaskell-5e9888bd9c22a1315a703f638591b50e657317c4.tar.gz
API Annotations: parens anns discarded for `(*)` operator
The patch from https://phabricator.haskell.org/D4865 introduces go _ (HsParTy _ (dL->L l (HsStarTy _ isUni))) acc ann fix = do { warnStarBndr l ; let name = mkOccName tcClsName (if isUni then "★" else "*") ; return (cL l (Unqual name), acc, fix, ann) } which discards the parens annotations belonging to the HsParTy. Updates haddock submodule Closes #16265
Diffstat (limited to 'compiler/parser')
-rw-r--r--compiler/parser/RdrHsSyn.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/parser/RdrHsSyn.hs b/compiler/parser/RdrHsSyn.hs
index f9b511dd26..88217c27a2 100644
--- a/compiler/parser/RdrHsSyn.hs
+++ b/compiler/parser/RdrHsSyn.hs
@@ -957,10 +957,10 @@ checkTyClHdr is_cls ty
goL (dL->L l ty) acc ann fix = go l ty acc ann fix
-- workaround to define '*' despite StarIsType
- go _ (HsParTy _ (dL->L l (HsStarTy _ isUni))) acc ann fix
+ go lp (HsParTy _ (dL->L l (HsStarTy _ isUni))) acc ann fix
= do { warnStarBndr l
; let name = mkOccName tcClsName (if isUni then "★" else "*")
- ; return (cL l (Unqual name), acc, fix, ann) }
+ ; return (cL l (Unqual name), acc, fix, (ann ++ mkParensApiAnn lp)) }
go l (HsTyVar _ _ (dL->L _ tc)) acc ann fix
| isRdrTc tc = return (cL l tc, acc, fix, ann)