[GHC] #10314: ApiAnnotations: mkHsForAllTy discards parens
GHC
ghc-devs at haskell.org
Thu Apr 16 15:27:24 UTC 2015
#10314: ApiAnnotations: mkHsForAllTy discards parens
-------------------------------------+-------------------------------------
Reporter: alanz | Owner: alanz
Type: bug | Status: new
Priority: normal | Milestone: 7.10.2
Component: Compiler | Version: 7.10.1
Keywords: | Operating System: Unknown/Multiple
ApiAnnotations | Type of failure: None/Unknown
Architecture: | Blocked By:
Unknown/Multiple | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
The code for `HsForAllTy` is
{{{#!hs
mkHsForAllTy exp tvs ctxt ty = HsForAllTy exp extra (mkHsQTvs tvs)
cleanCtxt ty
where -- Separate the extra-constraints wildcard when present
(cleanCtxt, extra)
| (L l HsWildcardTy) <- ignoreParens (last (unLoc ctxt)) = (init
`fmap` ctxt, Just l)
| otherwise = (ctxt, Nothing)
ignoreParens (L _ (HsParTy ty)) = ty
ignoreParens ty = ty
}}}
The process of cleaning the context calls `ignoreParens` which strips out
the `HsParTy`. In the process the `AnnOpenP` and `AnnCloseP` attached to
this are discarded.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10314>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list