toyboot4e
RTS で統計値を出していました。ナップサック問題で boxed vector を使うと GC が長引きますが、 MUT も 100 倍以上になっていて首を傾げていました
cabal install numbers で入れて(haskell自身は GHCup でインストールしています)import Data.Number.CReal ...
Could not load module 'Data.Number.CReal'
It is a member of the hidden package 'numbers-3000.2.0.2'.
You can run ':set -package numbers' to expose it.
(Note: this unloads all the modules in the current scope.)
Use -v (or `:set -v` in ghci) to see a list of the files searched for.:set -package numbers してからだと import Data.Number.CReal はエラーなく通るようになりました。cabal install numbers ではなく cabal install --lib numbers でインストールすれば使えるようになるはずです。どうも cabal install はライブラリーのインストールではなく、パッケージに含まれている実行ファイルのインストールのために作られているようなのでcabal install --lib numbers したら runhaskell でもエラーが出なくなりました。ありがとうございます!--lib のこと勉強してみます。 :pekorin:mwc-random を使って64ビット長の素数をランダム生成したり, segment tree のコードの一箇所でoff-by-oneバグがあってそれを訂正したりしていたら二時間半かかったみたいですね.辛い….