HIE file versions are not checked, and they don't have a sensible header
Even though we have a hie_file_version
field in HieFiles, while reading HIE files, we don't
check to see if this matches. This version is also doesn't appear at the start of the file,
but two Word32s after.
A more sensible approach would be to have a header for .hie files which is immediately recognizable, and includes the version of the HIE file format, as well as the version of GHC the file was generated with.
The HIE file version should also be generated automatically from the GHC version as is done for interface files
The proposed new header format for HIE files is:
- 3 bytes (0x48,0x49,0x45) corresponding to the capital ASCII letters "HIE"
- 1 Integer for the current HIE file version
- 1 Int for the length of the GHC version
- The raw bytes of the current GHC version
It is important that this is included in the 8.8 release, as 8.8 is the first release in which .hie files appear.