On Thu, Jun 25, 2009 at 3:49 PM, John Meacham<j...@repetae.net> wrote: > However, if the algorithm takes a signifigant amount > of time or resources, you may want to keep it in IO just so users can > have control over exactly when and how often it is run.
If you had a pure function written in Haskell that used a lot of time and memory, would you put it in IO just so users can have control over exactly when and how often it is run? bigFatFunction :: Foo -> IO Bar bigFatFunction x = return . bigFatFunction $ x If the function really does use a lot of time and memory and your compiler is duplicating calls to it, then you have a pessimizing compiler and should file a bug. --Max _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe