Skip to content

Poor error message if type signature lacks definition

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
Trac metadata
Trac field Value
Version 6.8.2
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system Unknown
Architecture Unknown
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information