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

adam vogt vogt.adam at gmail.com
Mon Jul 21 19:39:08 UTC 2014


On Mon, Jul 21, 2014 at 2:52 PM, Niklas Haas <haskell at nand.wakku.to> wrote:
> You can drop the forall csx. bit, for what it's worth, since csx is an
> unbound variable either way (and hence implicitly quantified).

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


More information about the Haskell-Cafe mailing list