summaryrefslogtreecommitdiff
path: root/compiler/iface
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@cs.brynmawr.edu>2017-08-16 14:33:06 -0400
committerBen Gamari <ben@smart-cactus.org>2017-09-14 15:07:05 -0400
commit8f99cd67262a67c46ed1af952003486825e0e9f7 (patch)
treeb477ccca477dc7abda782fd5817b0cf4d665ffc4 /compiler/iface
parent86e1db7d6850144d6e86dfb33eb0819205f6904c (diff)
downloadhaskell-8f99cd67262a67c46ed1af952003486825e0e9f7.tar.gz
Fix #13963.
This commit fixes several things: 1. RuntimeRep arg suppression was overeager for *visibly*-quantified RuntimeReps, which should remain. 2. The choice of whether to used a Named TyConBinder or an anonymous was sometimes wrong. Now, we do an extra little pass right before constructing the tycon to fix these. 3. TyCons that normally cannot appear unsaturated can appear unsaturated in :kind. But this fact was not propagated into the type checker. It now is.
Diffstat (limited to 'compiler/iface')
-rw-r--r--compiler/iface/IfaceType.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/compiler/iface/IfaceType.hs b/compiler/iface/IfaceType.hs
index dcd3ad3f9d..3475366e31 100644
--- a/compiler/iface/IfaceType.hs
+++ b/compiler/iface/IfaceType.hs
@@ -681,11 +681,13 @@ defaultRuntimeRepVars = go emptyFsEnv
go :: FastStringEnv () -> IfaceType -> IfaceType
go subs (IfaceForAllTy bndr ty)
| isRuntimeRep var_kind
+ , isInvisibleArgFlag (binderArgFlag bndr) -- don't default *visible* quantification
+ -- or we get the mess in #13963
= let subs' = extendFsEnv subs var ()
in go subs' ty
| otherwise
= IfaceForAllTy (TvBndr (var, go subs var_kind) (binderArgFlag bndr))
- (go subs ty)
+ (go subs ty)
where
var :: IfLclName
(var, var_kind) = binderVar bndr