On Sunday 18 July 2010 23:07:38, Eitan Goldshtrom wrote: > So just so I get this straight, the following are equivalent to the > computer, after compiling: > > 1. > fact = 10 > {-# INLINE fact #-} > > func x = x * fact > > 2. > func x = x * 10
I'm not sure if they're equivalent when compiled without optimisations, but with optimisations, they ought to. Actually, with optimisations, the inline-pragma shouldn't even be necessary. > > I'm also curious as to what the {-# #-} brackets represent. I've never > seen those before. They mark pragmas, there are a lot of useful pragmas in GHC, take a look at the user's guide, section 7. > > -Eitan _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe