Why is it so uncommon to use type signatures in where clauses?
问题 Does it help the compiler to optimise, or is it just surplus work to add additional type signatures? For example, one often sees: foo :: a -> b foo x = bar x where bar x = undefined Rather than: foo :: a -> b foo x = bar x where bar :: a -> b bar x = undefined If I omit the top level type signature, GHC gives me a warning, so if I don't get warnings I am quite confident my program is correct. But no warnings are issued if I omit the signature in a where clause. 回答1: Often definitions in where