Jeremy Yallop

Results 198 comments of Jeremy Yallop

For this particular example I think the simplest solution is to parameterise by level: ``` # let f level x y = msg level (fun m -> m "start"); let...

It's a little surprising that the depext command isn't finding anything. Do you have Homebrew or MacPorts installed?

@laowantong, you may be able to fix this by setting the `LIBFFI_CFLAGS` and `LIBFFI_LIBS` environment variables when installing ctypes. More details here: https://github.com/ocamllabs/ocaml-ctypes/blob/e66d23ea56fad3ef7c6b2c6955bebb06b01cb2d2/Makefile#L200-L209 That said, the recommended approach is to...

The double quotes (in the `LIBFFI_LIBS`) shouldn't be preceded by `\`: ``` export LIBFFI_CFLAGS=-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/ffi/include export LIBFFI_LIBS="-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/ffi/lib -lffi" ```

That looks like progress. Does the following help things along any further? ``` export LIBFFI_CFLAGS=-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/include/ffi/ export LIBFFI_LIBS="-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/usr/lib -lffi" ``` (The directories in the above should be the respective locations of...

The [stub_generation branch](https://github.com/yallop/async_ssl/tree/stub-generation) in my async_ssl fork (due to be [merged upstream](https://github.com/janestreet/async_ssl/pull/1) soon) is probably a reasonable place to start looking. There are also the [examples](https://github.com/ocamllabs/ocaml-ctypes/blob/master/Makefile.examples) and [tests](https://github.com/ocamllabs/ocaml-ctypes/blob/master/Makefile.tests) in the...

Out of interest, have you considered using ctypes without dynamic linking?

It works like this: 1. you use the same ctypes API to describe structs, functions, etc. (so you should be able to keep your existing code mostly intact) 2. you...

> I would need `ocamlmklib` call that just included the `.a` file from the original library along with the `.o` from those generated stubs, right? Yes, along with the `.cmx`...

Syntax for monadic code will interact well with implicits: if you desugar ``` ocaml let! x = e in let! y = e' in return (g x y) ``` into...