summaryrefslogtreecommitdiff
path: root/compiler/iface
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@cs.brynmawr.edu>2018-11-01 15:07:36 -0400
committerRichard Eisenberg <rae@cs.brynmawr.edu>2018-11-01 17:34:47 -0400
commit255d2e323a8879a7296a5ab94e6cc49023e2c86e (patch)
treeed7de96fa0c938998128d560799ddb9497ef269f /compiler/iface
parent82a716431cc680392e332bc2b1a1fd0d7faa4cd8 (diff)
downloadhaskell-255d2e323a8879a7296a5ab94e6cc49023e2c86e.tar.gz
Fix embarrassing, egregious bug in roles of (->)
Previously, I had inexplicably decided that (->)'s roles were all Representational. But, of course, its first two parameters are *dependent* RuntimeReps. All dependent parameters have a Nominal role, because all roles in kinds are Nominal. Fix is easy, but I have no idea how the world hasn't come crashing down before now. This was found while investigating #15801, which requires visible type application in types to observe. Hence, the test case will come with the main patch for #12045.
Diffstat (limited to 'compiler/iface')
-rw-r--r--compiler/iface/IfaceSyn.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/iface/IfaceSyn.hs b/compiler/iface/IfaceSyn.hs
index 3266c5aec1..7d1e697cdf 100644
--- a/compiler/iface/IfaceSyn.hs
+++ b/compiler/iface/IfaceSyn.hs
@@ -903,7 +903,7 @@ pprRoles :: (Role -> Bool) -> SDoc -> [IfaceTyConBinder]
pprRoles suppress_if tyCon bndrs roles
= sdocWithDynFlags $ \dflags ->
let froles = suppressIfaceInvisibles dflags bndrs roles
- in ppUnless (all suppress_if roles || null froles) $
+ in ppUnless (all suppress_if froles || null froles) $
text "type role" <+> tyCon <+> hsep (map ppr froles)
pprInfixIfDeclBndr :: ShowHowMuch -> OccName -> SDoc