
11 Jan
2005
11 Jan
'05
10:08 a.m.
On 11 Jan 2005, at 14:49, Dmitri Pissarenko wrote:
activityIndicator :: Customer -> Num activityIndicator (Customer id purchases) = length purchases </module-definition>
When I try to load this module into GHCi, I get this error:
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 are actually cases when the type inferred will be more general than you want, and in these cases you will want an explicit signature. But that will probably be fairly rare. Jules