[Haskell-beginners] type signature error in a where clause

Brandon Allbery allbery.b at gmail.com
Sat Nov 24 16:37:12 CET 2012

On Sat, Nov 24, 2012 at 10:32 AM, Mark Wallace <lotabout at gmail.com> wrote:

> Somehow it might seem a bit easier to me to grasp the function of a
> function with the help of type signature.
> I'll try just omitting the signatures, it's easier and more handy isn't it?

Sometimes, sometimes not.  Type signatures can help localize type errors,
as otherwise ghc can infer an unexpected type and then report it to you at
a different place, making it difficult to untangle where it got the weird
type from.

brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix/linux, openafs, kerberos, infrastructure          http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20121124/6b83a66d/attachment.htm>

More information about the Beginners mailing list