Haskell: How to only generate .hi file with ghc?

后端 未结 2 1246
执笔经年
执笔经年 2021-01-06 08:49

I would like to generate an .hi interface file and only that (no object file, no code generation at all).

I tried

ghc -         


        
2条回答
  •  执念已碎
    2021-01-06 09:08

    Around 2014, there was an option added to GHC specifically for this. Now, you can invoke:

    ghc -fno-code -fwrite-interface ...
    

    It actually speeds up compilation by about a quarter in some cases.

提交回复
热议问题