Closed ygrek closed 8 years ago
Should I merge f59bb45? At first glance it looks OK, and I threw a few protocols I had handy at it and verified the same code (around 50 KLoc) was being generated.
6ac392f (edit: was f59bb45cd) OTOH is a breaking change which would warrant a major version bump, but maybe we could follow a hackish strategy as follows: try to parse using comma separators (will fail on polymorphic types with multiple type parameters), and fall back to semi-colon separators. That should both support polymorphic types and be backwards-compatible. Another possibility is to add a new option using semi-colons like e.g. "ocaml.poly_type"
.
Edit somehow I missed #16 Will merge up to f59bb4 or d0e4100 and then try to implement the comma -> semicolon fallback.
Edit 2 OK I'm an idiot, hadn't realized you already were doing the comma -> semi-colon fallback. It must be made more robust though, as it stands ('a, 'b, 'c) mytype; fromf; to_f
would be split as ('a
, 'b
and 'c) mytype; fromf; to_f
.
Thanks, indeed, semicolon fallback is now better. (sorry for the late reply)
Thank you for all your work, I know it takes some fortitude to read/hack gen_OCaml.ml
and friends :)
:) it is ok, some concepts are not obvious but there is actually an architecture behind the code, so I get my share of fun.
NB I am currently working on adding include
, looks like it will be a simple change mostly at parser level.
example :
type iq
is wrong