[GHC] #11793: Confusing type error from constrained class method

GHC ghc-devs at haskell.org
Thu Apr 7 14:10:10 UTC 2016


#11793: Confusing type error from constrained class method
-------------------------------------+-------------------------------------
        Reporter:  gridaphobe        |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.0.1
       Component:  Compiler          |              Version:  8.0.1-rc2
      Resolution:                    |             Keywords:  error-message
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  warning at compile-time            |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by simonpj):

 > Is this intended?

 You are asking a question about a separate thing, unrelated to this
 ticket, namely the parsing of implicit parameter constraints.  It looks as
 though they have to be in parens, as things stand.  So
 {{{
 f :: (?x::Int) => blah   -- ok
 f :: ?x::Int   => blah   -- not ok
 }}}
 I see no fundamental reason why the second should be not-ok.  By all means
 open a ticket, and offer a parser patch, if you think it's important.

 Simon

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


More information about the ghc-tickets mailing list