On 11/17/07, Andrew Coppin <[EMAIL PROTECTED]> wrote:
> Suppose I write something like this:
>
>   foo :: [Int]
>   foo = concat (replicate 4 [4,7,2,9])
>
> The value of "foo" is completely determined at compile-time. So, will
> the compiler generate calls to concat and replicate, or will it just
> insert a large list constant here?
>

To add to what others have said, you might want to read the Simons'
paper "Secrets of the Glasgow Haskell Compiler Inliner":
http://research.microsoft.com/~simonpj/Papers/inlining/
It's pretty accessible, and talks about the various knobs that can be
twiddled in order to influence the black art of inlining.

Cheers,
Tim

-- 
Tim Chevalier * catamorphism.org * Often in error, never in doubt
"'There are no atheists in foxholes' isn't an argument against
atheism, it's an argument against foxholes." -- James Morrow
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to