
Hello, I want to use the FFT library in Haskell and for that I need to create an array. However, when I input array (1,100) [(i, i*i) | i <- [1..100]] in ghci, I get an error saying: No instance for (Enum e0) arising from the arithmetic sequence `1 .. 100' The type variable `e0' is ambiguous Possible fix: add a type signature that fixes these type variable(s) Note: there are several potential instances: instance Enum Double -- Defined in `GHC.Float' instance Enum Float -- Defined in `GHC.Float' instance Integral a => Enum (GHC.Real.Ratio a) -- Defined in `GHC.Real' ...plus 15 others In the expression: [1 .. 100] In a stmt of a list comprehension: i <- [1 .. 100] In the second argument of `array', namely `[(i, i * i) | i <- [1 .. 100]]' Could you please tell me how to add the type signature? -- Michal