
17 Jun
2014
17 Jun
'14
6:54 a.m.
On Tue, Jun 17, 2014 at 03:25:10AM -0700, Alexey Muranov wrote:
Is this the expected behavior that
1 = 0
does not raise any error? What does this mean?
I guess it's an irrefutable pattern match that doesn't bind any variables, so you can never see it fair. Cf Prelude> let (x, 1) = (2,3) Prelude> x *** Exception: <interactive>:7:5-18: Irrefutable pattern failed for pattern *** (x, 1) Prelude> let (x, 3) = (2,3) Prelude> x 2 I'll let someone more knowledgeable comment on why it's a good idea not to prevent this kind of thing. Tom