Dynamic libraries by default and GHC 7.8

Evan Laforge qdunkan at gmail.com
Tue Nov 27 22:34:59 CET 2012


I don't totally understand how ghci loading would work.  I assume that
for external packages it will go load  x.so instead of x.a, but what
about local modules?  I assume ghc -c is still going to produce .o
files, so does that mean ghci will have to interpret all local moules?
 If so, is there a way around that?  For instance, I imagine I could
add an extra build step to bundle the .o files up into a .so and then
somehow get ghci to know to load that.  I guess that's like compiling
all the local modules as a separate package and then adding that to
the package db, so in principle it should be possible.

On the plus side, it seems like this would do wonders for link time,
which is currently about 15s of "machine grinds to a halt" for me.  I
didn't see mention of it on the page, but I assume linking a binary
with lots of giant packages is going to be a lot faster if they can be
loaded on demand at runtime... or is just going to make startup really
slow?

On Tue, Nov 27, 2012 at 6:52 AM, Ian Lynagh <ian at well-typed.com> wrote:
>
> Hi all,
>
> GHC HEAD now has support for using dynamic libraries by default (and in
> particular, using dynamic libraries and the system linker in GHCi) for a
> number of platforms.
>
> This has some advantages and some disadvantages, so we need to make a
> decision about what we want to do in GHC 7.8. There are also some policy
> questions we need to answer about how Cabal will work with a GHC that
> uses dynamic libraries by default. We would like to make these as soon
> as possible, so that GHC 7.6.2 can ship with a Cabal that works
> correctly.
>
> The various issues are described in a wiki page here:
>     http://hackage.haskell.org/trac/ghc/wiki/DynamicByDefault
>
> If you have a few minutes to read it then we'd be glad to hear your
> feedback, to help us in making our decisions
>
>
> Thanks
> Ian
> --
> Ian Lynagh, Haskell Consultant
> Well-Typed LLP, http://www.well-typed.com/
>
>
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



More information about the Glasgow-haskell-users mailing list