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

Aleksey Khudyakov alexey.skladnoy at gmail.com
Wed Jul 10 00:21:10 CEST 2013

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