Ralph
Ralph

Reputation: 32264

Display function types in Haskell

Other than loading a Haskell file into GHCi and then using :type <expr>, is there any way to have the compiler display types for all of the functions as they are compiled?

Upvotes: 13

Views: 917

Answers (1)

Joachim Breitner
Joachim Breitner

Reputation: 25763

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.

Upvotes: 15

Related Questions