This is the old code:
| <:ctyp< ( $list:tys$ ) >> -> tupl _loc (List.map aux tys)
I figure it tries to match something like "int * int".
Following Nicolas's suggestion I thought I would see what this
expands to:
camlp4of -str '<:ctyp< ( int * int ) >>'
Ast.TyTup (_loc,
Ast.TySta (_loc, Ast.TyId (_loc, Ast.IdLid (_loc, "int")),
Ast.TyId (_loc, Ast.IdLid (_loc, "int"))))
How do I work back from this to the right expression within parens in
the original pattern above? I tried
| <:ctyp< ( $tup:tys$ ) >> -> tupl _loc (List.map aux tys)
but this produces ctyp instead of ctyp list so it's not suitable for
the tupl.
Thanks, Joel
--
http://wagerlabs.com/