
29 Dec
2004
29 Dec
'04
8:32 a.m.
In message <20041229115341.A431@botik.ru> "Serge D. Mechveliani"
Dear Haskellers, dear GHC team,
Is a variable `_x' equivalent to `_'
No, '_x' is a perfectly ordinary variable. The only special "dummy variable" (a pattern that matches anything but does not bind a varialbe) is '_'.
Does really Haskell mean this? It this reasonable? How to set self-commenting dummy variables?
You can use them as dummy variables by never using them in an expression context, only in pattern/binding context. As you noted they should be unique withing each scope. Duncan