Get the roles right for newtype instances
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 2 Aug 2017 16:59:56 +0000 (12:59 -0400)
committerRyan Scott <ryan.gl.scott@gmail.com>
Wed, 2 Aug 2017 17:00:56 +0000 (13:00 -0400)
commitd74983ef0c4a5b47a53d2821f8be9ebbf86e9257
treebd3f68548f19f7b06311e9435b9e181e1d17f8f8
parent8ef852098286749af1165e1215204a5de63babaf
Get the roles right for newtype instances

This was a simple slip, that gave rise to the bug reported in
comment:13 of Trac #14045.  We were supplying roles to mkAlgTyCon
that didn't match the tyvars.
compiler/typecheck/TcInstDcls.hs
compiler/types/Type.hs
testsuite/tests/deriving/should_compile/T14045b.hs [new file with mode: 0644]
testsuite/tests/deriving/should_compile/all.T