[Haskell-cafe] why doesn't ghc give you a type signature that works ?

briand at aracnet.com briand at aracnet.com
Wed May 18 05:44:02 CEST 2011


for example:

I will ask the glorious compiler, and it says:

*Main> :t calcFFT
calcFFT
  :: (Math.FFT.Base.FFTWReal r) =>
     V.Vector (Complex r) -> V.Vector (Complex r)

I then put the signature in my code, reload it, and:

  Not in scope: type constructor or class `Math.FFT.Base.FFTWReal'


It seems very strange to me that the fully qualified module name doesn't work, nor does any combination thereof, e.g. FFT.FFTWReal, FFT.Base.FFTWReal, etc...

I'm importing FFT as:

  import qualified Math.FFT as FFT

I'm not sure if that causes the problem.

Generally speaking this happens to me quite a lot, and I've never tried to understand what's going on, because the signature is not required.  I've decided to try now :-)

Obviously I'll need some help.

Thanks,

Brian



More information about the Haskell-Cafe mailing list