LoginSignup
4
2

More than 5 years have passed since last update.

GHCでプロファイルが取れない - Could not find module ...

Posted at

普通のコンパイルは通るけど、
-profをつけたら通らない時に解決できるかもしれません

遭遇したエラー

$ ghc -prof -auto-all boid.hs

して、

boid.hs:2:18:
    Could not find module ‘System.Random’
    Perhaps you haven't installed the profiling libraries for package ‘random-1.1@rando_9Kgekc9yEaLHLNUuw6paWL’?
    Use -v to see a list of the files searched for.

randomパッケージインストールしてるのに、Could not find module ...とかと言われる

解決策

これでパッケージを再インストールすると行けました
randomになっているところを「Could not find」のモジュールに変えてください)

cabal install -p random --reinstall --force-reinstalls

ちなみに、-pっていうのが--enable-library-profiling略ぽいです(多分)

参考

4
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
2