[GHC] #8030: FlexibleContexts PolyKinds Type Families bug

GHC ghc-devs at haskell.org
Thu Mar 26 14:29:44 UTC 2015


#8030: FlexibleContexts PolyKinds Type Families bug
-------------------------------------+-------------------------------------
        Reporter:  wvv               |                   Owner:
            Type:  bug               |                  Status:  closed
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.6.3
      Resolution:  invalid           |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  GHC rejects       |  Unknown/Multiple
  valid program                      |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:  #8034             |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by thomie):

 Fixed in HEAD, probably in commit
 f66e0e695b0377c469fbe877d4850fc0ebca2010:

 {{{
 Author: Simon Peyton Jones <>
 Date:   Wed Mar 4 11:59:47 2015 +0000

     A raft of small changes associated with -XConstrainedClassMethods

     See Trac #7854.  Specifically:

     * Major clean up and simplification of check_op in checkValidClass;
       specifically
          - use checkValidType on the entire method-selector type to detect
            ambiguity
          - put a specific test for -XConstrainedClassMethods

     * Make -XConstrainedClassMethods be implied by -XMultiParamTypeClasses
       (a bit ad-hoc but see #7854), and document in the user manual.

     * Do the checkAmbiguity test just once in TcValidity.checkValidType,
       rather than repeatedly at every level. See Note [When to call
 checkAmbiguity]

     * Add -XAllowAmbiguousTypes in GHC.IP, since 'ip' really is ambiguous.
       (It's a rather magic function.)

     * Improve location info for check_op in checkValidClass

     * Update quite a few tests, which had genuinely-ambiguous class
       method signatures.  Some I fixed by making them unambiguous; some
       by adding -XAllowAmbiguousTypes
 }}}

 Now always shows the same ambiguity error. Needs a regression test before
 closing.

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


More information about the ghc-tickets mailing list