[Haskell-cafe] Function Composition

Chris Witte cwitte at gmail.com
Tue Feb 6 04:55:20 EST 2007


Can anyone explain why Shape.Polygon would have a different type to
(Shape).Polygon, I thought the brackets would be redundant. Here is
the output from a Hugs session

Animation> :v
-- Hugs Version 20050113
Animation> :t Shape
Shape :: Shape -> Region
Animation> :t Polygon
Polygon :: [Vertex] -> Shape
Animation> :t (Shape.Polygon)
Polygon :: [Vertex] -> Shape
Animation> :t ((Shape).Polygon)
Shape . Polygon :: [Vertex] -> Region
Animation> :t Shape.(Polygon)
Shape . Polygon :: [Vertex] -> Region


Cheers
Chris Witte


More information about the Haskell-Cafe mailing list