ghc5.03 .hi and .hi-boot files don't you just love those incompatible changes?

Formerly .hi and .hi-boot files had the same format; however ghc5.03 has a binary format for .hi files and a textual one for .hi-boot files. This is a nuisance for me, because I have an ingenious scheme by which .hi-boot files are themselves from Haskell files by ghc, which thinks it is generating .hi files. Since I don't particularly want to go from writing to Haskell to writing interface files, I would like to keep the old scheme, but then I need a way of getting GHC to generate .hi-boot files from .hs files. One might think the options -ddump-hi or --show-iface would do the job, but they don't. --show-iface produces a file which causes Haskell later to choke with the message failed to load interface for `DisplayView': Bad interface file: DisplayView.hi-boot DisplayView.hi-boot:1: parse error on input `__interface' -ddump-hi is even worse, since it adds an extra two totally useless lines at the start (but otherwise appears to be the same as --show-iface). So is there any way of getting GHC to generate .hi-boot files? Or should I give up on using .hi-boot altogether and simply compile the Haskell direct to the .hi file?

Ah, I've figured it out. The new .hi-boot file format is actually Haskell!! Well almost. You have to fully qualify type names (you can't use Int, you must use GHC.Base.Int) and the input isn't run through -cpp.
participants (1)
-
George Russell