[Haskell-cafe] Re: Non-technical Haskell question
Robert Dockins
robdockins at fastmail.fm
Mon Dec 6 16:46:11 EST 2004
Henning Thielemann wrote:
> On Mon, 6 Dec 2004, Robert Dockins wrote:
>
>
>>The problem, of course, is that Haskell likes to tightly bind with the
>>libraries it uses (inlineing across modules and other optimizations).
>>So imaging if the "package" unit was a barrier to those kinds of
>>optimizations. Then, no knowledge of the internals of the package are
>>needed by importing modules, and "sufficently" compatable pacakges could
>>be drop in replacements, .so or .dll style.
>
>
> This would mean that functions like 'map' and 'foldr' couldn't be unrolled
> because they are in the package of the standard functions?
Probably it would make sense to have a basic set of modules which are
not in any package, but which are avaliable to import into all modules.
I image this would include things like the Prelude, the Haskell98
basic modules, the new Data.* modules, Control.*, Foreign.*, and
probably a few other things as well (in short, most of the current
Hierarchical Libraries). Obviously, barring map and foldr from inlining
would be a Bad Idea.
Things which exist now that I would think would work well behind a "no
inline" barrier:
Parsec
wxHaskell
HAXML
HToolkit
WASH
dozens of others I don't know about
I would guess that most of the entry points for these libraries are
already too complicated for GHC to think that it is "worth" inlining
them. Mandating a "no inline across packages" rule would likely not
change their performance much.
More information about the Haskell-Cafe
mailing list