On 3/13/07, Kirsten Chevalier <[EMAIL PROTECTED]> wrote:
I noticed that compiling with -O -frules-off causes the test program here to correctly print out "x". So, I was looking at the "take" rule in GHC/List.lhs. Doesn't this rule change the strictness of take? "take" [~1] forall n xs . take n xs = case n of I# n# -> build (\c nil -> foldr (takeFB c nil) (takeConst nil) xs n#)
I may be talking to myself here, but what I mean is:
take 1 (1:undefined)
[1]
build (\ c nil -> foldr (takeFB c nil) (takeConst nil) (1:undefined) 1#)
[1*** Exception: Prelude.undefined (where takeFB and takeConst are defined as they are in GHC/List.lhs) So that rule doesn't seem to be quite right. Cheers, Kirsten -- Kirsten Chevalier* [EMAIL PROTECTED] *Often in error, never in doubt "80% of success is showing up."--Woody Allen _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users