Browse thread
is this a bug ?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Jonathan Roewen <jonathan.roewen@g...> |
| Subject: | Re: [Caml-list] is this a bug ? |
> You found an semantic problem in the gramar ^^ > or-patterns do not play well with "when" > > I think it's a bug in the semantics... I don't believe so. It depends on the type. In fact, it works very well with sum types (I did a very small inference engine which used or patterns with when to great effect). The problem is the two match clauses are not different. They look different for the fact that the variables are bound in a different order -- which is why the warning occurs. For matching, variable naming has no semantic impact, hence the confusion. Jonathan