Re: loadInterfaceForModule

2014-11-06 Thread Gergely Risko
Hi Edward,

Thank you for your mail.

On 2014-11-05 18:37 (Wednesday), "Edward Z. Yang"  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

___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs


loadInterfaceForModule

2014-11-05 Thread Edward Z. Yang
Hello Gergely,

I was cleaning up LoadIface and I noticed in 

commit 69fa2e558d56178d33950df815c3233606b0d44e
Author: Austin Seipp 
Date:   Fri Nov 1 22:15:53 2013 -0500

Add support for module reification (#1480)

Authored-by: Gergely Risko 
Signed-off-by: Austin Seipp 

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).

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

Edward
___
ghc-devs mailing list
ghc-devs@haskell.org
http://www.haskell.org/mailman/listinfo/ghc-devs