On Thu, 11 Sep 2008, Tim Docker wrote:
I have a typeclass related question that I have been puzzling over. In a library I am working on, I have a series of functions for converting values to Renderables: | labelToRenderable :: Label -> Renderable | legendToRenderable :: Legend -> Renderable | axisToRenderable :: Axis v -> Renderable | layoutToRenderable :: Layout x y -> Renderable These names are overloaded for convenience via a typeclass:
I think that type classes are not for keystroke reduction, but for writing generic algorithms. If there is no algorithm that becomes more generic by the use of a type class, I would not use a type class, but stick to labelToRenderable and friends.
_______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
