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

GHC ghc-devs at haskell.org
Thu Oct 22 15:31:33 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):

 I think this would have been so much easier to hack around if there were a
 way to tell Happy that a rule should resolve all its shift/reduce
 conflicts by reducing, without assigning precedence to any tokens (which
 could mess up ''other'' shift/reduce resolutions). Then you'd just declare
 two tokens `family_kw` and `role_kw`, and two rules

 {{{
 ...
 family_kw : 'family' %prefer_reduction { ... }
 ...
 role_kw : 'role' %prefer_reduction { ... }
 }}}

 and use those tokens instead in the keyword-using declarations.

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


More information about the ghc-tickets mailing list