Building patches that change format of interface files

Adam Gundry adam at
Wed Apr 15 12:33:25 UTC 2015

[oops, forgot to cc ghc-devs]

Hi Janek,

On 15/04/15 13:20, Jan Stolarek wrote:
> Once I compile GHC I use the "cd ghc; make 2" trick to re-compile any
changes. That however does
> not work if my code changes modify the format of interface files - the
resulting compiler is
> unusable. In fact the only way to get a working compiler after
interface format change that I am
> aware of is to rebuild everything from scratch. Needless to say, this
takes a lot of time. Is
> there a better way?

I hit this problem quite often as well, but unfortunately don't know of
a general solution other than rebuilding everything.

> I'd like to test D841 but if this means rebuilding everything then
I'll have to pass.

In the case of D841, the interface file changes are very minor
(specifically, a new tag is used when an empty closed type family is
compiled, but of course none of them exist yet). Thus you might be able
to get away without a full rebuild. (I think ./configure incorporates
some git revision data into the interface file version number, so
presumably you have to avoid that as well.)

All the best,


Adam Gundry, Haskell Consultant
Well-Typed LLP,

More information about the ghc-devs mailing list