
27 Oct
2002
27 Oct
'02
12:32 p.m.
Consider the following program: --------------------------------- {-# NOINLINE b #-} b x = if even x then unsafePerformIO getChar else bot bot = bot main = do putChar (b 4) putChar (b 6) ----------------------------- when you compile the programm with the options: -O0 and execute the program you get:
test ab (That's the input) ab (That's the ouput)
when you compile the programm with the options: -O1 -fno-cse you get:
test ab aa
my question is now: which transformation/optimisation is responsible for that, and is it possible to switch off this transformation? David Sabel
8242
Age (days ago)
8242
Last active (days ago)
0 comments
1 participants
participants (1)
-
David Sabel