[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] Building ocaml-vchan's mirage test

There is some documentation that elaborates on talex5's explanation at https://mirage.io/wiki/mirage2-to-mirage3 , under the "Mirage3 errors" section. Please let us know whether it's still unclear how to proceed, as I'm always interested in improving this documentation.

This message was typed on a touchscreen keyboard. Please forgive typos and brevity.

On Sep 5, 2017, at 10:36, Thomas Leonard <talex5@xxxxxxxxx> wrote:

On 30 August 2017 at 20:43, Mike Neilsen <mike.neilsen@xxxxxxxxxxxxxxxxx> wrote:
I'm interested in exercising the "vchan-xen" OPAM package in a Mirage
unikernel, and I figured a good way to get started would be to study
the test/example code accompanying the ocaml-vchan[0] project.
However, I'm struggling to get the lib_test/mirage[1] unikernels to

I'm using Mirage 3.0.5 and vchan-xen 3.0.0.

I updated config_server.ml and config_client.ml to use the newest
Functoria syntax and succeeded in configuring the unikernels.  But
when I try to build them, I get the following error (server case is
shown here, but client is similar):

File "unikernel.ml", line 32, characters 5-9:
Error: This pattern matches values of type
        [< `Eof | `Error of 'a | `Ok of 'b ]
      but a pattern was expected which matches values of type
        (VX.buffer Mirage_flow.or_eof, VX.error) Result.result =
          (VX.buffer Mirage_flow.or_eof, VX.error) result

I'm not sure what to make of this...  My questions:

* Is there a simple way to rectify this problem?

The error says the result is now of type "result", which means either
Ok or Error, not `Ok, `Error or `Eof.
(note the lack of the ` on the new constructors).

* Is anyone successfully using ocaml-vchan in Mirage?

The Qubes firewall uses it:


talex5 (GitHub/Twitter)        http://roscidus.com/blog/
GPG: 5DD5 8D70 899C 454A 966D  6A51 7513 3C8F 94F6 E0CC

MirageOS-devel mailing list
MirageOS-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.