Hi, I may be wrong here, but I don't belive it's just let-patterns that have this property. I.e. what's the difference between...
(Just x) = _|_ f = x vs. f = let (Just x) = _|_ in x vs. f = x where (Just x) = _|_ I believe Haskell uses Normal Order Reduction in all these cases. Why is it just let-patterns? Can you give an example? Thanks, Chris. On Wed, 27 Aug 2008, Brandon S. Allbery KF8NH wrote: > On 2008 Aug 27, at 14:23, Maurí cio wrote: > > What does '~' mean in Haskell? I > > read in haskell.org/haskellwiki/Keywords > > that “(...) Matching the pattern ~pat > > against a value always suceeds, and > > matching will only diverge when one of > > the variables bound in the pattern is > > used.” Isn't that true for any > > variable, due to lazyness? > > Only in let-patterns; others, including case expressions and top level > definitions, are strict (which is in fact the normal way to force a > value). > > _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe