[Haskell-cafe] Problems with type family in a class

Leza Morais Lutonda leza.ml at fecrd.cujae.edu.cu
Mon Jul 21 20:56:20 UTC 2014


On 21/07/14 16:09, Niklas Haas wrote:
> On Mon, 21 Jul 2014 15:39:08 -0400, adam vogt <vogt.adam at gmail.com> wrote:
>> Also, the "ComplexSignal csx" constraint is redundant, since the
>> Complexable superclass constraint includes it. In other words, you can
>> write:
>>
>> class (Complexable s) ⇒ FourierTransformable s where
>>          fft  :: (csx ~ ComplexSignalType s) ⇒ csx → csx
> In fact, this type should now even be equivalent to:
>
> class Complexable s => FourierTransformable s where
>    fft :: ComplexSignalType s -> ComplexSignalType s
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
Yes, it was redundant, and now it looks better.
Thanks!

-- 
Leza Morais Lutonda, Lemol-C
http://lemol.github.io


50 Aniversario de la Cujae. Inaugurada por Fidel el 2 de diciembre de 1964  http://cujae.edu.cu




More information about the Haskell-Cafe mailing list