[GHC] #11264: Previously compiling example does not compile

GHC ghc-devs at haskell.org
Mon Dec 21 13:10:40 UTC 2015


#11264: Previously compiling example does not compile
-------------------------------------+-------------------------------------
        Reporter:  bgamari           |                Owner:
            Type:  bug               |               Status:  new
        Priority:  high              |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  7.11
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  GHC rejects       |            Test Case:
  valid program                      |  typecheck/should_compile/ClassOperator
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 The error message is quite right.  Here's an excerpt
 {{{
 class C a b where
   (**>) :: a -> a -> ()
 }}}
 The type of `(**>)` is ambiguous, because nothing fixes `b`.  You could
 remove a parameter from the class, or add a functional dependency.

 Anyway the error message looks spot on.

 Simon

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


More information about the ghc-tickets mailing list