use UniqSupply in FastString?

Nicolas Frisby nicolas.frisby at gmail.com
Sat Jul 6 22:59:45 CEST 2013


On Sat, Jul 6, 2013 at 2:55 PM, Ian Lynagh <ian at well-typed.com> wrote:

> On Fri, Jul 05, 2013 at 12:14:06PM -0500, Nicolas Frisby wrote:
> >
> > I've been trying to let a statically-linked compiler shares its
> FastString
> > table with plugins.
>
> Why not use a dynamically linked compiler?
>

I didn't stop to question the need for 'reinitializeGlobals`. I dove right
in to extending it based on my troubles with 7.6.3 (Joachim Breitner had
similar issues, with 7.6.3-ish I'm assuming) and have been learning about
the background as I go.

My 7.6.3 ghc was statically-linked, and I didn't question that aspect
either; though it seems to to be the default for that version's build
system.

If "platform supports plugins" implies "platform supports dynamically
linked ghc executable", then I suppose we could just make that a
prerequisite for Core plugins and rid ourselves of 'reinitializeGlobals`
all together.

Perhaps we could also discard the stuff in Globals.c. The header of that
file discusses ghci and dynamic-linking; I'm not up-to-date on that topic.
That'd be safe to rip out if "platform supports dynamic libraries" implies
"platform supports dynamically linked ghc executable", I think… but I'm
pretty oblivious about how ghci works and what it needs.

On the other hand, the Globals.c mechanism is lightweight and handles all
sorts of odd scenarios correctly. Maybe we should use it for all global
variables, just for robustness?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130706/3d1b5066/attachment.htm>


More information about the ghc-devs mailing list