> But pedantically even the function: > >> quux :: Int -> Int >> quux x = trace "Quux" (bar 12) > >> optmain :: IO () >> optmain = quux 10 `seq` quux 11 `seq` return () > > might print only once if GHC at the optimization level selected recognizes > that quux doesn't depend on its argument and rewrote your code with more > sharing.
Well to be specific, it depends on how you define "function", quux :: Int -> Int quux = trace "Quux" bar will print "Quux" once under the naive semantics. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
