[Haskell-cafe] Re: Type-level lambdas in Haskell? ( was
Multiparameter class error)
Alfonso Acosta
alfonso.acosta at gmail.com
Wed Feb 21 23:23:07 EST 2007
On 2/22/07, oleg at pobox.com <oleg at pobox.com> wrote:
> First of all, the design already exhibits the problem:
[snip]
> The reason is that [..]
> the function delaySY is declared *fully* polymorphic over 'a' -- there
> are no constraints on a and no restrictions. However,
>
> > delaySY :: HDPrimType a => a -> HDSignal a -> HDSignal a
I didn't even notice this problem.
> I'm not certain if there is a compelling reason to place mapSY,
> delaySY and zipWithSY in the same class
There's not such a reason, I was just stupid enough to overlook that
splitting the class would do the trick.
> If not, the following is the solution to the problem.
Certainly :)
Even if your solution doesn't look really elegant, it's the perfect
workaround ... as it's the only one I have. Thanks a lot.
More information about the Haskell-Cafe
mailing list