Bad error reporting when calling a function in a module which depends on a DLL on Windows
When you try to call a function which depends on a DLL, after the module has been loaded in ghci, you get:
Loading package Codec-Image-DevIL-0.1 ... can't load .so/.DLL for: ILU (addDLL: could not load DLL)
This error message is almost completely useless. It should call GetLastError() and present this information to the user.
I don't know whether the error message for GetLastError is actually useful, but otherwise it should derive a real problem with the library, e.g. "we searched for it in the PATH, but we couldn't find it, or the library format is wrong(use Dependency walker to verify that this is a valid Windows DLL), etc.".
In general every error message should state what it tried and why it failed. In the same sense that type-error messages do (assuming no bugs in the type-inferencer ;) ).
Trac metadata
Trac field | Value |
---|---|
Version | 6.10.4 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | GHCi |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | Unknown/Multiple |
Architecture |