> There is another less serious problem. Suppose that B had
> imported C only
> to export it again (either by listing it in the export list, or not
> having any export list at all). However I think the best way to deal
> with this is simply to copy over all the types and other information
> from C's .hi file to B's.
This is what GHC used to do, before version 2.00. There are one or two
tradeoffs; interface files can get really big if they include all the
declarations for entities they export, when there's a level of indirection
we quite often don't need to read the original interface file if the
importing module doesn't need anything from it.
When you duplicate information in interface files, you might end up
importing several copies of the same function via different routes, so in
the end I think it was decided that the cleanest solution would be to have
one and only one copy of each declaration.
Cheers,
Simon
- Re: Importing instances without pangling Make Jon Fairbairn
- Re: Importing instances without pangling Make George Russell
- Re: Importing instances without pangling Make Malcolm Wallace
- Re: Importing instances without pangling Make George Russell
- Re: Importing instances without pangling Make Sven Panne
- RE: Importing instances without pangling Make Sigbjorn Finne
- Re: Importing instances without pangling Make George Russell
- Re: Importing instances without pangling Make George Russell
- RE: Importing instances without pangling Make Sigbjorn Finne
- RE: Importing instances without pangling Make Simon Marlow
- RE: Importing instances without pangling Make Simon Marlow
- RE: Importing instances without pangling Make Simon Peyton-Jones
- Re: Importing instances without pangling Make George Russell
- RE: Importing instances without pangling Make Simon Peyton-Jones
- Re: Importing instances without pangling Make George Russell
