mransan / ocaml-protoc

A Protobuf Compiler for OCaml
https://mransan.github.io/ocaml-protoc/
MIT License
179 stars 33 forks source link

Add optional arguments to the default functions #73

Closed mransan closed 8 years ago

mransan commented 8 years ago

With this revision the generated default function accepts optional argument for each field of the record.

For instance:

val default_person : 
   ?name:string ->
   ?id:int32 ->
   ?email:string option ->
   ?phone:string list ->
   unit ->
   person