29 Aug
2001
29 Aug
'01
6:51 a.m.
HUGS> let ~(1,x) = (2,3) in x 3 GHCI> let ~(1,x) = (2,3) in x *** Exception: <no file>:0: Irrefutable pattern failed for pattern (1, x) I think ghc is doing the right thing: the match should fail. Using the translation of let into case as described in the report (section 3.12), one gets: case (2, 3) of ~(~(1,x)) -> x This expression should cause a pattern matching failure. But hugs evaluates it to 3. Interestingly: HUGS> case (2, 3) of ~(1,x) -> x Program error: {v1309 (2,Num_fromInt instNum_v29 3)} which is the correct behavior. Shouldn't multiple tilde's be the same as just one? (Hugs version: out of the CVS repository.) -Levent.
9089
Age (days ago)
9089
Last active (days ago)
0 comments
1 participants
participants (1)
-
Levent Erkok