在Haskell中显示函数类型

Ral*_*lph 13 haskell types

除了将Haskell文件加载到GHCi然后使用之外:type <expr>,有没有什么方法可以让编译器在编译时显示所有函数的类型?

Joa*_*ner 15

If you pass -fwarn-missing-signatures (or -Wall) to GHC it will list every top-level function that has no type annotation in the file, together with the inferred type.

  • 我认为这正是我所寻找的.谢谢. (3认同)