
Ashley Yakeley
I'm not sure if there's any standardisation effort or intent for .hi files, or whether they are likely to remain GHC-specific for the forseeable future,
Each Haskell compiler has its own .hi format. An idea has been floated that there should be a standard 'minimal' .hi format, but it is not clear that it would be useful in practice, since the extra stuff the compiler normally puts in there must be for a reason.
but I was wondering if there should be a standard UNIX directory to put them in. For instance:
/usr/share/haskell-import/Org/Org/Semantic/HBase/Basic/Trivial.hi
...much like C has "/usr/include/".
This is very difficult, because not only does the .hi format vary between compilers, but even with GHC alone it is utterly dependent on the version of the compiler. Hence, GHC's .hi files must go in directories like /usr/local/lib/ghc-5.00.2/imports /usr/local/lib/ghc-5.02.3/imports etc. However, you can organise your own libraries as a 'package' if you like, and keep all the .hi files that belong with it together. The GHC documentation has more info on how to build a package. (Nhc98 has also adopted a simplified version of GHC' package mechanism, to appear in the next release.) Regards, Malcolm