[Haskell-cafe] Problems with type family in a class
Niklas Haas
haskell at nand.wakku.to
Sun Jul 20 13:57:08 UTC 2014
On Sun, 20 Jul 2014 00:33:00 -0400, Leza Morais Lutonda <leza.ml at fecrd.cujae.edu.cu> wrote:
> Thanks for the explanation, Niklas, now I understand (I'm understanding)
> type families and I left with:
>
> class (Signal s,
> ComplexSignal (ComplexSignalType s),
> RealSignalType (ComplexSignalType s) ~ s) ⇒ Complexable s where
>
> type ComplexSignalType s
>
> class (Complexable s) ⇒ FourierTransformable s where
> fft ⦂ ∀ csx. (csx ~ ComplexSignalType s, ComplexSignal csx) ⇒ csx → csx
>
>
> Maybe more complex than normal?
>
> Thanks again.
Hmm, to be honest I'm not sure if this is effectively any different from
what you had in your original example.
Does this work as expected w.r.t type inferencing and instance selection?
More information about the Haskell-Cafe
mailing list