Re: Re[2]: [Haskell-cafe] stack overflow when using ST monad

2006-08-24 Thread Gregory Wright
Hi Bulat! On Aug 24, 2006, at 1:07 PM, Bulat Ziganshin wrote: Hello Brian, Thursday, August 24, 2006, 4:16:41 PM, you wrote: I would make all the fields strict here, to be sure that no lazyness can creep about unseen eg: data Tag s = Tag { tagID :: !Int, state ::

Re[2]: [Haskell-cafe] stack overflow when using ST monad

2006-08-24 Thread Bulat Ziganshin
Hello Gregory, Thursday, August 24, 2006, 4:43:57 PM, you wrote: > I agree this should be a FAQ. we already have something like this on performance/strictness wikipage. although adding your example of misusing $! may be helpful - peoples are always better learned on (good and bad) examples rathe

Re[2]: [Haskell-cafe] stack overflow when using ST monad

2006-08-24 Thread Bulat Ziganshin
Hello Brian, Thursday, August 24, 2006, 4:16:41 PM, you wrote: > I would make all the fields strict here, to be sure that no lazyness can > creep about unseen eg: > data Tag s = Tag { > tagID :: !Int, > state :: !(STRef s TagState), > count :: !(STRef s Integer) >