[Haskell-cafe] Function Composition
Andres Loeh
loeh at iai.uni-bonn.de
Tue Feb 6 05:08:40 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
Shape.Polygon is a qualified name, and you probably have a module
called Shape. Use spaces around the dot ...
Cheers,
Andres
More information about the Haskell-Cafe
mailing list