We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#2147 added the ability to say open (struct ... end) in OCaml, however this expression is only available in the ml files, not the mli files.
open (struct ... end)
This could be useful in the following example:
open (struct module ShortAlias = Some.VeryLongModule.Name type some_type_alias = string end) val f : some_type_alias -> ShortAlias.t -> t
where someone needs a type or module alias but doesn't want to pollute the interface itself with said aliases or unnecessary open.
The text was updated successfully, but these errors were encountered:
This particular example can be written using :=:
:=
module ShortAlias := Some.VeryLongModule.Name type some_type_alias := string val f : some_type_alias -> ShortAlias.t -> t
Sorry, something went wrong.
No branches or pull requests
#2147 added the ability to say
open (struct ... end)
in OCaml, however this expression is only available in the ml files, not the mli files.This could be useful in the following example:
where someone needs a type or module alias but doesn't want to pollute the interface itself with said aliases or unnecessary open.
The text was updated successfully, but these errors were encountered: