[Haskell-cafe] Hierachical abstraction

Luke Palmer lrpalmer at gmail.com
Fri Jan 29 14:10:35 EST 2010

On Fri, Jan 29, 2010 at 11:45 AM, Andrew Coppin
<andrewcoppin at btinternet.com> wrote:
> But now suppose that I want not just circles, but *anything* that can
> possibly be reduced to line segments.

If all you know about it is that it can be reduced to line segments,
there is no loss of generality in representing that simply as
[LineSegment].  This is getting close to the discussion in my recent
post about the existential typeclass pattern[1] -- there is no need
for extra structure if you cannot use it.


[1] http://lukepalmer.wordpress.com/2010/01/24/haskell-antipattern-existential-typeclass/

More information about the Haskell-Cafe mailing list