diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2015-05-08 12:00:33 +0200 |
---|---|---|
committer | Alan Zimmerman <alan.zimm@gmail.com> | 2015-05-08 12:02:27 +0200 |
commit | 2f3bfec0337b05ba5175925f7561238edb5d352c (patch) | |
tree | 064d901d8640e6c7a744d1ac797c1855aceebe5d /ghc/Main.hs | |
parent | 4d290ad44ee56d7da9d6c780ce581c64e11331e9 (diff) | |
download | haskell-2f3bfec0337b05ba5175925f7561238edb5d352c.tar.gz |
ApiAnnotations : mkGadtDecl discards annotations for HsFunTy
Summary:
When mkGadtDecl is presented wih a HsFunTy it discards the SrcSpan, thus
disconnecting any annotations on the HsFunTy.
```
mkGadtDecl names (L ls (HsForAllTy imp Nothing qvars cxt tau))
= return $ mk_gadt_con names
where
(details, res_ty) -- See Note [Sorting out the result type]
= case tau of
L _ (HsFunTy (L l (HsRecTy flds)) res_ty)
-> (RecCon (L l flds), res_ty)
_other -> (PrefixCon [], tau)
...
```
This can be triggered by the following
```
{-# LANGUAGE GADTs #-}
module GADTRecords2 (H1(..)) where
-- | h1
data H1 a b where
C3 :: (Num a) => { field :: a -- ^ hello docs
} -> H1 Int Int
```
Test Plan: ./validate
Reviewers: hvr, austin
Subscribers: bgamari, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D848
GHC Trac Issues: #10309
Conflicts:
testsuite/tests/ghc-api/annotations/Makefile
testsuite/tests/ghc-api/annotations/all.T
Diffstat (limited to 'ghc/Main.hs')
0 files changed, 0 insertions, 0 deletions