Documentation for `checkOldIface` is misleading
The doc comment on checkOldIface
says:
We return a tuple where the
first element is a bool saying if we should recompile the object file
and the second is maybe the interface file, where Nothing means to
rebuild the interface file and not use the existing one.
checkOldIface :: ... -> (RecompileRequired, Maybe ModIface)
I take this to mean that if we aren't building object code (because of -fno-code
etc.), we can ignore the first element of the result, and just check if the second element has a ModIface
, and use it if it is present. However, this doesn't seem to be true after looking at the implementation.
In checkVersions
, we have the following lines:
; recomp <- checkDependencies hsc_env mod_summary iface
; if recompileRequired recomp then return (recomp, Just iface) else do {
It returns a Just iface
even though we do need to compile the ModIface
. Is this the intended behaviour? If so, the documentation should probably be updated.