[Haskell-cafe] Optimization flag changing result of code execution

kudah kudahkukarek at gmail.com
Wed Jul 10 12:10:24 CEST 2013


Yes, it does. Without optimizations the result is
"ndgorsfesnywaiqraloa", while with optimizations the result is always
"aaaaaaaaaabbaaaaaaaa".

On Wed, 10 Jul 2013 02:21:10 +0400 Aleksey Khudyakov
<alexey.skladnoy at gmail.com> wrote:

> On 10.07.2013 01:38, kudah wrote:
> > I've attached the script that I had trouble with. It tries to
> > replicate one directory structure in another directory, while
> > replacing filenames and file contents with random data. When
> > compiled with -O1 or -O2 resulting file and directory names are
> > composed only of a's and b's, but file contents seem properly
> > randomized.
> >
> No luck. On my computer script works correctly with and without 
> optimizations. My best guess that uniformR is problematic. Does
> 
>  > (\g -> randName g 20) =<< create
> 
> show different behavior with and without optimizations?



More information about the Haskell-Cafe mailing list