Thanks, Ivan. I may be back later, after I read http://en.wikibooks.org/wiki/Haskell/Laziness Michael --- On Sat, 7/31/10, Ivan Lazar Miljenovic <ivan.miljenovic@gmail.com> wrote: From: Ivan Lazar Miljenovic <ivan.miljenovic@gmail.com> Subject: Re: [Haskell-cafe] Constructor question To: "michael rice" <nowgate@yahoo.com> Cc: haskell-cafe@haskell.org Date: Saturday, July 31, 2010, 9:32 AM michael rice <nowgate@yahoo.com> writes:
From: Data.Complex
data (RealFloat a) => Complex a = !a :+ !a
What's the purpose of the exclamation marks?
Forcing; it means that the values are evaluated (up to WHNF) before the Complex value is constructed: http://www.haskell.org/ghc/docs/6.12.1/html/users_guide/bang-patterns.html -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com