Given a function like

  fill 0# mpa = return ()
  fill i# mpa = do
                  let i'# = i# -# 1#
                  writeMP mpa (I# i'#) e
                  fill i'# mpa

it would be nice if GHC were to lambda drop it (on the core
level) into

  fill i# mpa = fill' i#
    where
      fill' 0# = return ()
      fill' i# = do
                   let i'# = i# -# 1#
                   writeMP mpa (I# i'#) e
                   fill' i'#

as this allows it to subsequently apply the new case
liberation optimisation.  By performing the lambda dropping
manually, I have gotten much better code in some performance
sensitive definitions.

Cheers,
Manuel

_______________________________________________
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to