diff options
author | Alan Zimmerman <alan.zimm@gmail.com> | 2015-05-11 10:57:25 +0200 |
---|---|---|
committer | Alan Zimmerman <alan.zimm@gmail.com> | 2015-05-11 10:57:25 +0200 |
commit | e4032b1951a35d8df63a74ebfee7449988b5ef40 (patch) | |
tree | c1e51275ba5a23411de3ea6248e620262bbfc2af /compiler/basicTypes/IdInfo.hs | |
parent | 811b72adedcd12149783eac19ebccff1dd72bc1c (diff) | |
download | haskell-e4032b1951a35d8df63a74ebfee7449988b5ef40.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
Reviewed By: austin
Subscribers: bgamari, thomie, mpickering
Differential Revision: https://phabricator.haskell.org/D848
GHC Trac Issues: #10309
Diffstat (limited to 'compiler/basicTypes/IdInfo.hs')
0 files changed, 0 insertions, 0 deletions