[GHC] #9739: GHC 7.8 chokes on recursive classes

GHC ghc-devs at haskell.org
Wed Oct 29 15:16:03 UTC 2014


#9739: GHC 7.8 chokes on recursive classes
-------------------------------------+-------------------------------------
              Reporter:  bitonic     |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:  7.10.1
             Component:  Compiler    |          Version:  7.9
  (Type checker)                     |         Keywords:
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Unknown
  Unknown/Multiple                   |       Blocked By:
       Type of failure:  Compile-    |  Related Tickets:
  time crash                         |
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------

Comment (by dfeuer):

 This is interesting: the definition of `Class1` is actually ''illegal'' in
 Haskell 98, because `class3` constrains the type variable `a`. This sort
 of thing is only supposed to be allowed with `-XConstrainedClassMethods`.
 In fact, if you enable that flag, suddenly the compiler realizes there's a
 loop! So it looks likely that someone made the flag enable the extra loop
 checking required by such methods, but accidentally failed to make it
 control whether such things are allowed at all!

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


More information about the ghc-tickets mailing list