[GHC] #3805: Bad error message "Invalid type signature"

GHC trac at galois.com
Tue Jan 5 07:25:24 EST 2010


#3805: Bad error message "Invalid type signature"
--------------------------------+-------------------------------------------
  Reporter:  asuffield          |          Owner:                  
      Type:  bug                |         Status:  new             
  Priority:  normal             |      Milestone:                  
 Component:  Compiler (Parser)  |        Version:  6.12.1          
Resolution:                     |       Keywords:                  
Difficulty:                     |             Os:  Unknown/Multiple
  Testcase:                     |   Architecture:  Unknown/Multiple
   Failure:  None/Unknown       |  
--------------------------------+-------------------------------------------
Comment (by asuffield):

 Basically the message needs to indicate the information in your comment,
 and show that the parser is using an unintended interpretation. To spot
 the error quickly, the programmer needs to know the lexemes that got
 unexpectedly grabbed by the :: and what the parser was expecting to see.
 Something along these lines:

 {{{
 TestErr.hs:1:0: Invalid type signature: `f g' is not a plain variable name
 }}}

 (Personally, I spent a good ten minutes of head-scratching before
 realising that it was complaining about the term, not the type)

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


More information about the Glasgow-haskell-bugs mailing list