
29 Sep
2010
29 Sep
'10
3:27 a.m.
Has someone been able to successfully compile and run this example code?? If so, what am I doing wrong? Is there some obvious error I'm incurring in? :D
It's because you didn't add {-# OPTIONS -fvectorise #-} when compiling the DPHVectMul.hs module. The GHC vectoriser rewrites calls to fromPArrayP to the real implementations in its back-end library, but if the vectoriser doesn't run you get the default implementation which is just "undefined". I agree its an atrocious error message. It should have a real one in the head / GHC 7.0
You can also add -fvectorise on the command line, but I prefer using the OPTIONS pragma because it's less easy to forget. Ben.