7026Re: "ocaml_beginners":: Type mismatch but why?
- Jan 4, 2007Jonathan Roewen wrote:
> ...Just to emphasize this point, from "4.1.1 Optional arguments" of the
> I've never quite fully understood labels. Perhaps the fully applied
> function doesn't need labels thing doesn't apply to optional arguments
> -- which seems a shame.
> Anyways, the workaround is to label the optional argument. And to
> eliminate the warning, either change the order so it's not at the end,
> or add a dummy argument to the end (unit).
OCaml manual we have
"A function taking some optional arguments must also take at least one
non-labeled argument. This is because the criterion for deciding
whether an optional has been omitted is the application on a
non-labeled argument appearing after this optional argument in the
While this may not directly address your "fully applied" issue, it
definitely covers the ordering thing.
- << Previous post in topic Next post in topic >>