[Haskell-cafe] Simple type-class experiment turns out not so simple...
Steve Horne
sh006d3592 at blueyonder.co.uk
Mon Jan 9 09:43:16 CET 2012
On 08/01/2012 20:25, Brent Yorgey wrote:
> On Fri, Jan 06, 2012 at 10:51:58AM +0000, Steve Horne wrote:
>> If I specify both extensions (-XMultiParamTypeClasses and
>> -XFlexibleInstances) it seems to work, but needing two language
>> extensions is a pretty strong hint that I'm doing it the wrong way.
> Not necessarily. These two extensions in particular (and especially
> the second) are quite uncontroversial.
>
As it turns out, I don't need extensions at all, at least for
walkableBinTree. Two answers pointed out how to handle that. I'm not yet
entirely sure what will happen when I start adding more typeclasses
(searchableBinTree etc) to the family - I've been distracted.
Also - after reading those answers and trying the suggestions, I'm
pretty sure I've done tutorials that covered this after all. I must have
just left it too long before trying them out properly.
More information about the Haskell-Cafe
mailing list