[Haskell-cafe] Question, re: illegal instance error.

David Banas capn.freako at gmail.com
Tue Nov 10 16:15:39 UTC 2015


Hi all,

I don’t understand why this code:

50: instance (IsNat n, RealFloat a) => FFT (RTree n) a where

is generating this error:

fft_test.hs:50:36:
    Illegal instance declaration for ‘FFT (RTree n) a’
      (All instance types must be of the form (T a1 ... an)
       where a1 ... an are *distinct type variables*,
       and each type variable appears at most once in the instance head.
       Use FlexibleInstances if you want to disable this.)
    In the instance declaration for ‘FFT (RTree n) a’

and was hoping someone could help me get it.

Thanks!
-db

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20151110/da262128/attachment.html>


More information about the Haskell-Cafe mailing list