[GHC] #14266: AllowAmbiguousTypes doesn't play well with default class methods

GHC ghc-devs at haskell.org
Wed Oct 4 07:51:45 UTC 2017


#14266: AllowAmbiguousTypes doesn't play well with default class methods
-------------------------------------+-------------------------------------
        Reporter:  chris-martin      |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.0.2
      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 simonpj):

 Re comment:15; ah yes, I see, thanks.  I was writing in response to
 comment:4.

 However, note that

 * All I wrote in comment:10 applies regardless of any stuff to do with
 type patterns.  If you write an instance sig, it needs to be matched up
 with the class decl.

 * If you ''do'' write an instance sig, then the difficulties of comment:15
 can be dealt with by emitting a suitable instance sig, which in turn
 supports visible type application.

 So I still say that comment:10 describes the number-1 problem.  Yes, type
 patterns might be nice too.

 The last para of comment:10 describes a solution that might be workable

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


More information about the ghc-tickets mailing list