[Haskell-beginners] Compilation fails with Data.Numbers.Primes

Daniel Fischer daniel.is.fischer at googlemail.com
Fri Jan 7 18:01:11 CET 2011


On Friday 07 January 2011 17:51:32, Graham Enos wrote:
> Hi all,
>
> I'm having trouble compiling (with GHC) a program that uses the
> Data.Numbers.Primes package (newest, 0.2.0.0) on Mac OS X, 10.6. Any
> help would be greatly appreciated!
>
> It gets to the linking stage, and then complains of undefined symbols:
>
> ghc -O2 counting_primes_200.hs

Unless you're using GHC-7, you need the --make flag:

$ ghc -O2 --make counting_primes_200.hs

(or you can specify the used packages directly with the -package flag, but 
--make is far more convenient).




More information about the Beginners mailing list