Am Montag, 21. November 2005 16:09 schrieb Roberto Zunino: > Yitzchak Gale wrote: > > In the following, why does testA work and testB diverge? > > Where is the strictness coming from? > > My guess: from strict pattern matching in (>>=).
This is a problem I came across some months ago. State uses lazy pattern matching (implicitely via a let expression) while StateT uses strict pattern matching (inside a do statement). Both should definitely use lazy pattern matching, in my opinion. > [...] > The following StateT variant uses lazy (irrefutable) pattern match instead. Good! :-) > Regards, > Roberto Zunino. > [...] Best wishes, Wolfgang _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe