Excerpts from Richard Jones's message of Fri Apr 25 15:18:12 +0200 2008:
> (1) How do I match on the pattern which is literally '_' in the
> original code?
> 
>     match mypatt with
>     | <:patt< _ >> -> ...
> 
> seems like it matches any pattern.

I don't think so, it's supposed to match only the wildcard pattern.

Proof:
  $ camlp4oof -str 'match x with <:patt< _ >> -> y'
  match x with | Ast.PaAny _ -> y

-- 
Nicolas Pouillard aka Ertai

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to