[Haskell-cafe] Haskell symbol ~
cmb21 at kent.ac.uk
Wed Aug 27 15:14:23 EDT 2008
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
f = let (Just x) = _|_ in x
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?
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
More information about the Haskell-Cafe