[Haskell-beginners] Class definition syntax
Shawn Willden
shawn-haskell at willden.org
Sat Oct 31 21:55:02 EDT 2009
On Saturday 31 October 2009 10:50:10 am Daniel Fischer wrote:
> Am Samstag 31 Oktober 2009 17:33:10 schrieb Joe Fredette:
> > You'll probably need to look at associated types/functional
> > dependencies. The former is the new hotness, the latter is the old and
> > not-so-busted. A quick search of the wiki ought to reveal much more
> > than I can possibly explain, there is an example on the page for
> > Assoc. Types about generic Map implementation, which is similar to
> > what you're trying to do.
>
> Or perhaps he should look at the class IArray from Data.Array.IArray, maybe
> he can just declare instances of IArray for his datatypes.
> Without more information, I can't tell which way to go.
This gives me some ideas, whether to use IArray directly, or just to use it as
a model for my own class.
Thanks,
Shawn.
More information about the Beginners
mailing list