logo       

RE: PackedString.hGetPS produces index exception: msg#00040

lang.haskell.glasgow.bugs

Subject: RE: PackedString.hGetPS produces index exception

> -----Original Message-----
> From: glasgow-haskell-bugs-admin@xxxxxxxxxxx
> [mailto:glasgow-haskell-bugs-admin@xxxxxxxxxxx] On Behalf Of
> Simon Peyton-Jones
> Sent: 16 April 2003 08:46
> To: George Russell; glasgow-haskell-bugs@xxxxxxxxxxx
>
> Remove old .hi files. When the .hi-file format changes, GHC can emit
> horrid messages like this. It's a royal pain, arising from
> their binary
> format. It only bites during version transitions, so we've
> never gotten
> around to fixing it.

We've now established that this wasn't an interface file mismatch, but
nevertheless I think I should clarify the situation with interface
files.

Most users will never see an interface-file mismatch crash, because an
interface contains the compiler version, which is checked before reading
the rest of the file. For example, if I try to use a 5.04.2 interface
with 5.04.3, I get:

B.hs:2:
failed to load interface for `A':
Bad interface file: A.hi
mismatched interface file versions: expected 5043, found
5042

The problem you're referring to is when the interface format changes
during *development*, because we only bump the interface version at
release time. We could have a finer-grained version that gets bumped
every time the format changes, but that's difficult because figuring out
automatically that the format changed requires walking over lots of
compiler data structures. We could let the programmer do it, but in
practice the programmer would probably forget (or not realise the format
changed) and end up getting the same errors.

Cheers,
Simon


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise