[Haskell-cafe] Question, re: illegal instance error.
lambda.fairy at gmail.com
Wed Nov 11 06:33:11 UTC 2015
Andrey's answer is correct.
I asked a similar question on StackOverflow a few years back . You
might find the resulting discussion useful.
On Wed, Nov 11, 2015 at 5:15 AM, David Banas <capn.freako at gmail.com> wrote:
> Hi all,
> I don’t understand why this code:
> 50: instance (IsNat n, RealFloat a) => FFT (RTree n) a where
> is generating this error:
> 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.
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
Chris Wong (https://lambda.xyz)
"I had not the vaguest idea what this meant and when I could not
remember the words, my tutor threw the book at my head, which did not
stimulate my intellect in any way." -- Bertrand Russell
More information about the Haskell-Cafe