[Haskell-cafe] Debugging Haskell code
Paul Moore
p.f.moore at gmail.com
Sun Sep 27 16:17:48 EDT 2009
2009/9/27 andy morris <andy at adradh.org.uk>:
> mersenne-random uses the FFI, so it's probably that. I just ran your
> code with mersenne-random-1.0 and didn't get a segfault. What version
> are you using?
Not entirely sure, I just did a cabal install a short while back.
>cabal list mersenne
Warning: The package list for 'hackage.haskell.org' is 19 days old.
Run 'cabal update' to get the latest list of available packages.
* mersenne-random
Synopsis: Generate high quality pseudorandom numbers using a SIMD Fast
Mersenne Twister
Latest version available: 1.0
Latest version installed: [ Not installed ]
Homepage: http://code.haskell.org/~dons/code/mersenne-random
License: BSD3
* mersenne-random-pure64
Synopsis: Generate high quality pseudorandom numbers purely using a Mersenne
Twister
Latest version available: 0.2.0.2
Latest version installed: [ Not installed ]
Homepage: http://code.haskell.org/~dons/code/mersenne-random-pure64/
License: BSD3
That's odd, it seems to be saying it's not installed at all! Hmm, no -
I did a cabal install --user (because Vista doesn't let me do
site-wide installs), looks like cabal list doesn't pick up user
installs.
Hmm, cabal install mersenne-random --user didn't do anything, but
cabal install mersenne-random --user --reinstall did reinstall it, and
now it seems to work.
Odd.
Thanks for the help - presumably the lesson for me is that a crash
implies that unless I am using FFI or unsafe functions, I should look
to any libraries I use. It begs the question of how I'd prove that was
the problem if there hadn't been an updated version of the library - I
guess I'd use the standard random module & see if that worked.
Paul.
More information about the Haskell-Cafe
mailing list