[GHC] #9173: Better type error messages

GHC ghc-devs at haskell.org
Mon Sep 28 21:57:36 UTC 2015


#9173: Better type error messages
-------------------------------------+-------------------------------------
        Reporter:  simonpj           |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.8.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
-------------------------------------+-------------------------------------

Comment (by chreekat):

 {{{
 Foo.hs:4:7:
     Couldn't match expected type ‘Int’ with actual type ‘[Char]’
     In the expression: "Howdy!"
     In an equation for ‘foo’: foo = "Howdy!"
 }}}

 This example reminded me that sometimes the phrase "In the expression" is
 confusing to me. It seems that the phrase *should* be "Of the expression".
 Using 'in' makes me expect that the error message is referring to some
 particular component of the expression, rather than the whole thing.

 It's a small incongruence, but it's big enough to force me to stop
 thinking about code and start thinking about the possible meanings of the
 error message.

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


More information about the ghc-tickets mailing list