Hi,

Am Dienstag, den 28.08.2012, 18:16 -0400 schrieb Carter Schonwald:
> On Tuesday, August 28, 2012, Yves Parès wrote:
>         Monad? Simple strictness anotation is enough in that case:
>         
>                 upd_noupd n =
>                     let l = myenum' 0 n
>                         h = head l
>                     in h `seq` last l + h

darn, I though I changed my examples before posting to:

        upd_noupd n = 
            let l = myenum' 0 n
            in last l + length l

("head" was a bad example because actually due to strictness analysis
and worker/wrapper transformation, GHC would yield good code even
without "`seq`").

In this case (which is actually the benchmarked case), reordering or
strictness annotations do not help.

Greetings and sorry for the confusion,
Joachim


-- 
Dipl.-Math. Dipl.-Inform. Joachim Breitner
Wissenschaftlicher Mitarbeiter
http://pp.info.uni-karlsruhe.de/~breitner

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to