diff options
author | Ben Gamari <ben@smart-cactus.org> | 2017-03-06 12:20:06 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-03-06 12:44:15 -0500 |
commit | 8ca4bb1ce9d94bb9f519f620c1f5ed8063007d33 (patch) | |
tree | cd409ca73a6af00f2b298bb01e7dea026242622d /compiler/iface/TcIface.hs | |
parent | c02d03de839c4ee0acbd52dad575bc5e27972595 (diff) | |
download | haskell-8ca4bb1ce9d94bb9f519f620c1f5ed8063007d33.tar.gz |
Read COMPLETE sets from external packages
Currently, `COMPLETE` pragmas are not read from external packages at
all, which quite limits their usefulness. This extends
`ExternalPackageState` to include `COMPLETE` sets from other packages,
and plumbs around the appropriate values to make it work the way you'd
expect it to.
Requires a `binary` submodule update.
Fixes #13350.
Test Plan: make test TEST=T13350
Reviewers: rwbarton, mpickering, austin, simonpj, bgamari
Reviewed By: simonpj
Subscribers: simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D3257
Diffstat (limited to 'compiler/iface/TcIface.hs')
-rw-r--r-- | compiler/iface/TcIface.hs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/compiler/iface/TcIface.hs b/compiler/iface/TcIface.hs index 2a56392910..2d30f52b8a 100644 --- a/compiler/iface/TcIface.hs +++ b/compiler/iface/TcIface.hs @@ -15,7 +15,7 @@ module TcIface ( typecheckIfacesForMerging, typecheckIfaceForInstantiate, tcIfaceDecl, tcIfaceInst, tcIfaceFamInst, tcIfaceRules, - tcIfaceVectInfo, tcIfaceAnnotations, + tcIfaceVectInfo, tcIfaceAnnotations, tcIfaceCompleteSigs, tcIfaceExpr, -- Desired by HERMIT (Trac #7683) tcIfaceGlobal ) where @@ -1096,9 +1096,7 @@ tcIfaceCompleteSigs :: [IfaceCompleteMatch] -> IfL [CompleteMatch] tcIfaceCompleteSigs = mapM tcIfaceCompleteSig tcIfaceCompleteSig :: IfaceCompleteMatch -> IfL CompleteMatch -tcIfaceCompleteSig cm@(IfaceCompleteMatch ms t) = - forkM (text "COMPLETE" <+> ppr cm) $ - CompleteMatch <$> mapM tcIfaceConLike ms <*> tcIfaceTyConByName t +tcIfaceCompleteSig (IfaceCompleteMatch ms t) = return (CompleteMatch ms t) {- ************************************************************************ @@ -1760,14 +1758,6 @@ tcIfaceDataCon name = do { thing <- tcIfaceGlobal name AConLike (RealDataCon dc) -> return dc _ -> pprPanic "tcIfaceExtDC" (ppr name$$ ppr thing) } -tcIfaceConLike :: Name -> IfL ConLike -tcIfaceConLike name = - do { thing <- tcIfaceGlobal name - ; case thing of - AConLike cl -> return cl - _ -> pprPanic "tcIfaceExtCL" (ppr name$$ ppr thing) } - - tcIfaceExtId :: Name -> IfL Id tcIfaceExtId name = do { thing <- tcIfaceGlobal name ; case thing of |