[Haskell-cafe] Haskell symbol ~
benja.fallenstein at gmail.com
Wed Aug 27 15:11:07 EDT 2008
I've got one thing to add to the replies so far:
On Wed, Aug 27, 2008 at 8:23 PM, Maurício <briqueabraque at yahoo.com> 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?
To any variable, yes. But you don't apply it to a variable, you apply
it to a constructor pattern: not ~xs but ~(x:xs).
More information about the Haskell-Cafe