[GHC] #10592: Allow cycles in class declarations

GHC ghc-devs at haskell.org
Wed Dec 16 20:46:35 UTC 2015


#10592: Allow cycles in class declarations
-------------------------------------+-------------------------------------
        Reporter:  MikeIzbicki       |                Owner:
            Type:  feature request   |               Status:  infoneeded
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  7.10.1
  checker)                           |
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by MikeIzbicki):

 I've found another suspicious edge case.  GHC will loop if you use the
 same code above, but add the `(/=)` function to the `Eq` class as follows:
 {{{
 class Boolean (Logic a) => Eq a where
     type Logic a :: *
     (==) :: a -> a -> Logic a

     (/=) :: a -> a -> Logic a
     a/=b = not (a==b)
 }}}

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


More information about the ghc-tickets mailing list