"dodo" bug
Sigbjorn Finne
sof@galois.com
Mon, 13 May 2002 06:57:36 -0700
Thanks for a fine report - turned out to be a code generation
bug that has now been fixed.
--sigbjorn
----- Original Message -----
From: "Edmund GRIMLEY EVANS" <Edmund.Grimley-Evans@arm.com>
To: <hugs-bugs@haskell.org>
Sent: Wednesday, May 01, 2002 12:34
Subject: "dodo" bug
> The following program prints 16843011 when I run it (version December
> 2001 of Hugs, compiled with gcc-3.0 or gcc-2.95.1).
>
> Replace "else x" by "else True" to get the expected result.
>
> Can you reproduce this, or is my system broken?
>
> Edmund
>
>
> jj [] = 0
> jj (x:xs) = x + (jj xs) * 256
>
> dodo :: Int
> dodo = jj (map f [0..3]) where
>
> f k = y where
>
> y = case True of
> _ -> (if (if True then True else x) then id else id) 0
>
> x = True
>
> main = print dodo