On Fri, Feb 04, 2005 at 01:00:33PM +0100, Miroslav Silovic wrote: > The problem (in general) with this requirement is that it conflicts with > inhericance. Perl6 allows you to extend any type (using 'but' operator, > for example) and so, any time you promise that something will be of a > certain type, the type's children will be allowed. That's at least the > way I read A12. I also think that juntions will have their elements' > type's interface and so they can also pose for any type. In other words, > you need a real polymorphic object system in Haskell for this to work. > > Fortunately there's one handily described at > http://homepages.cwi.nl/~ralf/OOHaskell/
Yes, I have read the OOHaskell paper and traced the hideously clever HList code. However, as I'm not doing Perl6->Haskell translator, but merely a Perl6 interpreter, so OOHaskell's model, whilst interesting, is of only academic interest to me. :) What I'd like to know is (again) the operational semantic of "Array of Array"; is the two "Array" puns that happens to share a class name, or is it a shorthand for existential types, or is it a shorthand for the "Ref" type that looks and acts like the Data.Dynamic type in haskell? Or something else altogether? Thanks, /Autrijus/
pgpKls8O9J6nb.pgp
Description: PGP signature