Skip to content

driver: Something fishy about file output with -fno-code -fwrite-interface

Consider these modules:

https://gist.github.com/2656b7f38c0546aece7ecee198dbf686

Then if I run

../_build/stage1/bin/ghc S.hs -fno-code -fwrite-interface

Then the resulting files are

S.dyn_o  S.hi  S.hs  S.o  T.dyn_hi-boot  T.dyn_o  T.hi  T.hi-boot  T.hs  T.hs-boot  T.o

Notice there is no .o-boot or dyn_o-boot files produced.

But if you look at the progress output, it claims T.hs-boot produces T.dyn_o, that is surely wrong.

[1 of 3] Compiling T[boot]          ( T.hs-boot, nothing, T.dyn_o )
[2 of 3] Compiling S                ( S.hs, S.o, S.dyn_o )
[3 of 3] Compiling T                ( T.hs, T.o, T.dyn_o )

Something doesn't add up.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information