I fixed a bug recently [831] where I'd reorganised some code and the wrong identifier was being picked up. It would have been immediately apparent if the compiler had detected that an identifier was unreferenced so I've now added that check. In the current SVN version identifier checking is off by default but can be turned on with PolyML.Compiler.reportUnreferencedIds := true; The compiler will then report identifiers that are unreferenced as a warning.
Currently, this applies only to value identifiers, excluding value constructors. An identifier is referenced if it used anywhere, which includes a recursive use, exported as a top-level value or used in the result of a structure or functor. When used in a structure or functor an identifier must be mentioned in the signature to be considered as referenced.
Reference information isn't currently available through the IDE protocol but that can be added.
Enabling unreferenced identifier checking on the compiler itself showed up a minor bug so it's already proved useful.
David