[GHC] #10996: family is treated as keyword in types even without TypeFamilies enabled

GHC ghc-devs at haskell.org
Wed Oct 21 22:38:00 UTC 2015


#10996: family is treated as keyword in types even without TypeFamilies enabled
-------------------------------------+-------------------------------------
        Reporter:  oerjan            |                Owner:
            Type:  bug               |               Status:  new
        Priority:  low               |            Milestone:
       Component:  Compiler          |              Version:  7.10.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  GHC rejects       |            Test Case:  type Test
  valid program                      |  family = family
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by oerjan):

 `family` and `role` are really the same as `forall`: they can currently be
 used as `varid`s, even with their extensions enabled.  The error is that
 they can ''never'' be used as `tyvarid`s. (I think my [comment:1
 comment:1] applies to `role` as well, but not to `forall`, because
 `forall` can appear in places where an applied type constructor variable
 would fit.)  However, `forall` actually ''does'' appear to be special
 cased. Without any extensions enabled:

 {{{
 Prelude> type Test role = role

 <interactive>:2:11: parse error on input `role'
 Prelude> type Test forall = forall
 Prelude>
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10996#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list