Again: Uniques in GHC

p.k.f.holzenspies at utwente.nl p.k.f.holzenspies at utwente.nl
Mon Oct 6 19:55:17 UTC 2014


Dear Joachim,


Although I can't quite get what you're saying from the posts on that link, I'm not immediately sure what you're saying should extend to hi-files. These files are very much specific to the compiler version you're using, as in, new GHCs add stuff to them all the time and their binary format does not (seem to) provision for being able to skip unknown things (i.e. it doesn't say how large the next semantic block is in the hi-file).


If we're going to keep the formats the same for any architecture, we're going to have to limit 64-bit machines to 32-bit (actually 30-bits, another thing I don't quite understand in BinIface) Uniques. There seem to be possibilities to alleviate the issues with parallel generation of fresh Uniques in a parallel version of GHC. The idea is that, since 64-bits is more than we'll ever assign anyway, to use a few for thread-ids, so we would guarantee non-conflicting Uniques generated by different threads.


Anyway, maybe someone a tad more knowledgeable about Uniques could maybe tell me on what scale Uniques in the hi-files should be unique? Must they only be non-conflicting in a Module? In a Package? If I first compile a file with GHC and then, in a separate invocation of GHC, compile another, surely their hi-files will have some of the same Uniques for their own, different things? Where are these conflicts resolved when linking multiple independently compiled files? Are they ever?


Regards,

Philip




?

________________________________
From: Joachim Breitner <mail at joachim-breitner.de>
Sent: 06 October 2014 12:36
Subject: Re: Again: Uniques in GHC

<snip>

A while ago we had problems with haddock in Debian when the
serialization became bit-dependent.^1 I suggest to keep the specification
of any on-disk format independent of architecture specifics.

Greetings,
Joachim

^1 http://bugs.debian.org/586723#15


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20141006/a826dac1/attachment-0001.html>


More information about the ghc-devs mailing list