[GHC] #9612: Use functional dependencies to give more specific error messages

GHC ghc-devs at haskell.org
Fri Sep 26 11:38:48 UTC 2014


#9612: Use functional dependencies to give more specific error messages
-------------------------------------+-------------------------------------
              Reporter:  rwbarton    |            Owner:
                  Type:  feature     |           Status:  closed
  request                            |        Milestone:
              Priority:  normal      |          Version:  7.8.3
             Component:  Compiler    |         Keywords:
  (Type checker)                     |     Architecture:  Unknown/Multiple
            Resolution:  fixed       |       Difficulty:  Unknown
      Operating System:              |       Blocked By:
  Unknown/Multiple                   |  Related Tickets:
       Type of failure:              |
  None/Unknown                       |
             Test Case:              |
  typecheck/should_fail/T9612        |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
Changes (by simonpj):

 * status:  new => closed
 * testcase:   => typecheck/should_fail/T9612
 * resolution:   => fixed


Comment:

 Good idea, thank you. The error message is now
 {{{
 T9612.hs:16:9:
     Couldn't match type ‘[(Int, a)]’ with ‘(Int, a)’
     arising from a functional dependency between:
       constraint ‘MonadWriter (Int, a) (WriterT [(Int, a)] Identity)’
         arising from a use of ‘tell’
       instance ‘MonadWriter w (WriterT w m)’ at T9612.hs:20:10-59
 }}}
 Simon

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


More information about the ghc-tickets mailing list