[GHC] #11427: TypeSynonyms not deduced

GHC ghc-devs at haskell.org
Fri Jan 15 09:41:46 UTC 2016


#11427: TypeSynonyms not deduced
-------------------------------------+-------------------------------------
        Reporter:  phadej            |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.1-rc1
      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 phadej):

 goldfire: I can break previous example by adding `MyEq a` constraint to
 `MyClass`:

 {{{
 {-# LANGUAGE UndecidableInstances #-}
 {-# LANGUAGE FlexibleInstances #-}
 class MyEq a where
   myeq :: a -> a -> Bool

 class MyEq a => MyOrd a where
   mycomp :: a -> a -> Ordering

 class MyEq a => MyClass a where
   mydef :: a -> Bool

 instance MyOrd a => MyClass a where
   mydef x = myeq x x
 }}}

 AFAICS, `MyOrd a` in instance declration should provide `MyEq a`.

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


More information about the ghc-tickets mailing list