
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 syntactic sugar, that simplifies into a type without them, or are they more like parentheses in algebra, or...? In particular, I'm having difficulty understanding the results of composition or application that involves parentheses... I think I've got it figured out and then I find another strange expression that doesn't have the type I expect. Here is an example using the (self-made) function "sqr": code: --------
:t sqr sqr :: Double -> Double :t (.) (.) :: (b -> c) -> (a -> b) -> a -> c :t (. sqr) (. sqr) :: (Double -> c) -> Double -> c :t ((. sqr) .) ((. sqr) .) :: (a -> Double -> c) -> a -> Double -> c
Everything makes sense up until the last expression, "((. sqr) .)". Where did the "(a -> Double -> c)" come from? What's going on here? -- frigidcode.com