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

GHC ghc-devs at haskell.org
Wed Oct 21 05:38:22 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):

 Just as a musing, I think it ''might'' just be possible to treat `family`
 entirely as a non-keyword like `as` or `hiding`. The only kind of
 ambiguity I can think of that requires lookahead is with `TypeOperators`
 enabled and

 {{{
 type family MyTypeFamily a b = ...

 type family :~: work = ...
 }}}

 but even then, it is disambiguated by whether the next token is an
 identifier or an operator.

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


More information about the ghc-tickets mailing list