[GHC] #10592: Allow cycles in class declarations

GHC ghc-devs at haskell.org
Fri Jul 10 23:21:03 UTC 2015


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

Comment (by simonpj):

 The stuff in #10318 is speculation about a possible feature.  But the
 question remains: in your application If
 {{{
 class (Scalar (Scalar a) ~ Scalar a, Field (Scalar a)) => Vector a
 class Vector x => Field x
 }}}
 was accepted by GHC, would it serve your purpose?  That means that in any
 instance of `Vector t`, GHC will need to prove that `Scalar (Scalar t) ~
 Scalar t`.  Will that be true, in your application?

 If so, that makes the speculation in #10318 more persuasive.

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


More information about the ghc-tickets mailing list