2 ms·
> I don't think row polymorphism is what the OP asked for. They might be what the OP wants, but that's a-whole-nother matter. I think that's the other way arou
by wtetzner 9y ago
> I don't think row polymorphism is what the OP asked for. They might be what the OP wants, but that's a-whole-nother matter.
I think that's the other way around. It appears to be what they asked for, even if it may not be what they want.
They pretty clearly said they wanted to be able to write a type that says "Object that has method f :: a -> Int".
What you're talking about doesn't seem to be duck typing (though it might work nicely along side duck typing), it's being able to add methods to objects at run time (unless I'm misunderstanding).