Fix embarrassing, egregious bug in roles of (->)
authorRichard Eisenberg <rae@cs.brynmawr.edu>
Thu, 1 Nov 2018 19:07:36 +0000 (15:07 -0400)
committerRichard Eisenberg <rae@cs.brynmawr.edu>
Thu, 1 Nov 2018 21:34:47 +0000 (17:34 -0400)
commit255d2e323a8879a7296a5ab94e6cc49023e2c86e
treeed7de96fa0c938998128d560799ddb9497ef269f
parent82a716431cc680392e332bc2b1a1fd0d7faa4cd8
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.
compiler/iface/IfaceSyn.hs
compiler/types/TyCon.hs