loadInterfaceForModule

Gergely Risko gergely at risko.hu
Thu Nov 6 10:48:50 UTC 2014


Hi Edward,

Thank you for your mail.

On 2014-11-05 18:37 (Wednesday), "Edward Z. Yang" <ezyang at mit.edu> writes:
> Hello Gergely,
>
> You added a function loadInterfaceForModule which has the exact same
> type as loadModuleInterface, except when debugging is on it has an extra
> check to ensure you don't try to load the the current module (this seems
> like a general invariant that would be good to enforce).

As you can imagine after 1 year I only have limited recollection on
this, but now I checked out the repository to see the differences for
myself and I agree with your assessment, my function seems superfluous.

Also loadModuleInterfaces seems to be just a mapM_ of
loadModuleInterface instead of the four line implementation.  Maybe it
is being done like that for performance, but looking into
initIfaceTcRn does not seem very expensive.  Am I mistaken?

> Was there any particular reason you created an extra function for this,
> or can we just use the existing function?

Feel free to use the existing one.  By the way, these changes were
done as part of making it possible for TH to handle annotations,
therefore the relevant tests are in tests/annotations (grep for
reifyModule).

Thanks for taking care of this!
Gergely



More information about the ghc-devs mailing list