"ocaml_beginners":: Re: Pattern matching and polymorphic variants
- --- In email@example.com, Richard Jones <rich@...> wrote:
>Thanks a lot for all your help.
> On Tue, Dec 08, 2009 at 04:21:33PM -0000, johan.mazel wrote:
> > Actually my code looks like:
> > let icmp = ICMP.Icmp.unmarshal ip#data_env in
> > match icmp with
> > | (`EchoReply : ICMP.Icmp.o) ->
> Again, the type assertion isn't necessary and is probably a syntax
> error. But the main thing is you're missing the required argument to
> `EchoReply. If you don't care about the argument, try:
> | `EchoReply _ ->
> Richard Jones
> Red Hat
It's now working.