On 6/11/08, Jonathan Cast <[EMAIL PROTECTED]> wrote: > This doesn't apply to f, though --- it has a function type, so the user > presumably already knows it won't be subject to updating, no? > Distinguishing functions from variables by the form of declaration, > rather than the type, seems somewhat questionable to me.
Not necessarily, contrast these two definitions: f = foldr (+) 0 f_expensive = let n = head $ drop 100000 $ fibs 1 1 in foldr (+) n With the monomorphism restriction in place, f_expensive only calculates n once. Without, it gets calculated each time f is instantiated. -- ryan _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe