[Haskell-cafe] Optimization flag changing result of code execution
kudah
kudahkukarek at gmail.com
Tue Jul 9 20:10:12 CEST 2013
Same here, I used mwc-random to generate random strings. It works in
ghci and when compiled with -O0, but with -O1 and -O2 I've been getting
exclusively a's and b's.
On Sun, 17 Mar 2013 18:48:06 +0500 Azeem -ul-Hasan <azeeem at live.com>
wrote:
> I am using
> GHC 7.6.1
> mwc-random 0.12.0.1
> vector 0.9.1
> primitive 0.4.1
>
> Azeem
>
> On 16.03.2013 13:31, Azeem -ul-Hasan wrote:
> > Nope that isn't the case either. Even if I make use of defaultSeed
> > through create the problem still remains. The problem seems to be
> > in the generation of a vector of (a,a) i.e in the part
> >
> > V.generateM ((round $ p*(fromIntegral $ l*z)) `div` 2) (\i->
> > R.uniformR ((0,0) , (l-1,l-1)) gen)
> >
> > in line 16. Thanks again.
> >
> I've tried to run you program and I've got approximately same results
> regardless of optimization level. Which versions of GHC, mwc-random,
> vector and primitive do you use?
>
>
>
More information about the Haskell-Cafe
mailing list