[Haskell-beginners] Ambiguous type variables

Dennis Raddle dennis.raddle at gmail.com
Mon Mar 17 22:56:05 UTC 2014


On Mon, Mar 17, 2014 at 1:28 PM, Kim-Ee Yeoh <ky3 at atamo.com> wrote:

>
> On Tue, Mar 18, 2014 at 2:14 AM, Dennis Raddle <dennis.raddle at gmail.com>wrote:
>
>> class Bt d c memo | d -> c, d -> memo where
>
>
> Could you also say something about the instances you intend to implement
> for this typeclass?
>
> If there's only 1, which the statement of the problem suggests as much,
> you can dispense of the typeclass entirely and just work with plain
> functions!
>
> Could be that you want something working first and generalize /
> polymorphize later.
>


I don't know yet how I want to represent the solution being searched for;
i.e. I don't know how I want to represent musical structures, and I need
the freedom to try different ones without rewriting my code. I also wanted
to implement a few toy problems to do testing on my algorithm.

But, you are absolutely right that I am generalizing too quickly. I worked
on a toy problem today and had several insights. I noticed that some
problems have specifics that don't fit the same mold.
-Dennis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20140317/d958b79d/attachment.html>


More information about the Beginners mailing list