[Haskell-cafe] haskell code from hi

Svein Ove Aas svein.ove at aas.no
Sun Nov 22 11:14:26 EST 2009

On Sun, Nov 22, 2009 at 1:04 AM, Uwe Hollerbach <uhollerbach at gmail.com> wrote:
> Ouch... my condolences, but I think you're screwed. I think the .hi
> files are purely interface info, and the .o files have all the info on
> what to actually do (and getting to .hs files from .hi+.o is gonna be
> like going from sausage to pig, in any case). If you haven't messed
> with the disk, I think your best bet might be to try and undelete
> files. That might be as messy as looking at the raw disk image and
> trying to recover disk sectors, or possibly there are still entire
> files there that are just not referenced by directory entries. Either
> (or any) way, it's a bit chancy...
And this why you always, *always* use a revision-control system or at
least good backups.

.hi files actually do contain some code, specifically what ghc decides
can be inlined (see ghc --show-iface), but it's not the sort of code
you'd get any use from. Have a look, you'll see.

Svein Ove Aas

More information about the Haskell-Cafe mailing list