On Sun, Nov 25, 2012 at 6:27 AM, Christopher Howard <christopher.howard@frigidcode.com> wrote:
Could someone explain more precisely to me what is the significance of
parentheses in the type of an expression? Are they just some kind of

One thing you're missing is that parentheses often have multiple meanings.  Specifically, the thing that's tripping you up is a section:  a partially applied operator.

(+) is an operator, with parentheses around it to turn it into a function.  You can sometimes see this passed to e.g. fmap.

By extension, (5 +) is a section:  the operator (+) with its left parameter applied already, equivalent to \x -> 5 + x.  (+ 5) has applied the right parameter instead of the left.

If you have a parenthesized thing that starts or ends with an operator, it's a section.  Your example "> :t ((. sqr) .)" has two of them, both partially applying (.).

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix/linux, openafs, kerberos, infrastructure          http://sinenomine.net