#2292: Poor error message if type signature lacks definition
-----------------------------+----------------------------------------------
    Reporter:  NeilMitchell  |       Owner:          
        Type:  bug           |      Status:  new     
    Priority:  normal        |   Component:  Compiler
     Version:  6.8.2         |    Severity:  minor   
    Keywords:                |    Testcase:          
Architecture:  Unknown       |          Os:  Unknown 
-----------------------------+----------------------------------------------
 The file

 {{{
 nub :: a
 }}}

 Produces the error message in GHC:

 {{{
 Temp.hs:5:0: Not in scope: `nub'
 }}}

 The problem isn't that {{{nub}}} is not in scope, but that there is no
 definition. Importing {{{Data.List}}} (and bringing {{{nub}}} into scope)
 doesn't solve the problem, but gives a new error message. Hugs does quite
 a bit better:

 {{{
 ERROR file:.\Temp.hs:5 - Missing binding for variable "nub" in type
 signature
 }}}

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2292>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to