page:
> Definition of f:
>    f = foldr (+) 0
> Types:
>    0 :: (Num t) => t
>    foldr (+) 0 :: Num a => [a] -> a
>    f :: [Integer] -> Integer
> 
> Please remind me, again, of the advantages of f being something different 
> from the formula defining it.

Overloaded 'constants' take a dictionary as an argument, so while you
think the value might be computed only once, it make actually be
recomputed each time. This can be a killer performance penalty for
overloaded numeric constants.

Of course, disabling this is pretty simple.

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

Reply via email to