[Haskell-cafe] confusion about 'instance'....
lrpalmer at gmail.com
Thu Jan 10 09:11:59 EST 2008
On Jan 10, 2008 2:04 PM, Nicholls, Mark <Nicholls.Mark at mtvne.com> wrote:
> I can translate OO into mathematical logic pretty easily, I was trying
> to do the same thing (informally of course) with Haskell....but things
> are not quite what they appear....not because of some OO hang up (which
> I probably have many)...but because of what "type class" actually means.
But you can think of a type class as a set of types! The problem is that
if we allow certain kinds of instances (such as the Foo instance I gave
earlier) then the set is allowed to be non-recursive (only recursively
enumerable), so determining whether a particular type is a member of it
would be undecidable.
More information about the Haskell-Cafe