[GHC] #14101: Type synonyms can make roles too conservative
GHC
ghc-devs at haskell.org
Fri Aug 11 16:35:51 UTC 2017
#14101: Type synonyms can make roles too conservative
-------------------------------------+-------------------------------------
Reporter: dfeuer | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.4.1
Component: Compiler (Type | Version: 8.2.1
checker) |
Resolution: | Keywords: roles
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC rejects | Unknown/Multiple
valid program | Test Case:
Blocked By: | Blocking:
Related Tickets: #8234 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by goldfire):
Sorry -- I wrote a post here but somehow it got lost. (I'm sure this is my
fault.)
This is by design. Any non-nominal role on a type parameter must be
assigned to a proper type parameter to that type. When you eta-reduce,
there's no place to put the non-nominal role.
Happily, Ryan's patch solves the problem and looks utterly correct to me.
So, while the synonym's argument's role is still nominal, that fact
becomes irrelevant during role inference.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14101#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list