[GHC] #12763: Incorrect behavior with empty functional dependencies

GHC ghc-devs at haskell.org
Wed Oct 26 10:13:35 UTC 2016


#12763: Incorrect behavior with empty functional dependencies
-------------------------------------+-------------------------------------
        Reporter:  diatchki          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |
      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 Simon Peyton Jones <simonpj@…>):

 In [changeset:"801c26372742fc79bd3756bdcb710031c716c402/ghc"
 801c2637/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="801c26372742fc79bd3756bdcb710031c716c402"
 Fundeps work even for unary type classes

 The functional-dependency improvement functions,
    improveFromAnother
    improveFromInstEnv
 had a side-condition that said the type class has to have at
 least two arguments.  But not so, as Trac #12763 shows:

    class C a | -> a where ...

 is perfectly legal, albeit a bit of a corner case.
 }}}

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


More information about the ghc-tickets mailing list