[Haskell-cafe] Signature of a function

Henning Thielemann iakd0 at clusterf.urz.uni-halle.de
Tue Jan 11 10:45:00 EST 2005


On Tue, 11 Jan 2005, Jules Bean wrote:

> Hint: Don't put signatures on functions, then. Instead, let the 
> compiler infer the type for you! If you want to know what the type is, 
> ask GHCi with :info. And if you think it is helpful documentation, you 
> can copy-paste the correct signature from ghci into your source code!

There should always be signatures. I had also cases, where the suggested
signature was too restricted. I think this was due to the monomorphism
restriction. 



More information about the Haskell-Cafe mailing list