Skip to content
New issue

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

Please support type parameters in ocaml::import! #119

Open
emchristiansen opened this issue Mar 11, 2023 · 0 comments
Open

Please support type parameters in ocaml::import! #119

emchristiansen opened this issue Mar 11, 2023 · 0 comments

Comments

@emchristiansen
Copy link

I'm fleshing out the Lwt interface by using it in my project, and it would be really nice to be able to write:

ocaml::import! {
  fn lwt_poll<T: ocaml::ToValue + ocaml::FromValue>(p: &Lwt<T>) -> Option<T>;
}

Instead right now everything has to go through ocaml::Value which reduces clarity, requires casting, and allows errors to creep in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant