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

Re: [MirageOS-devel] What is correct type of Mirage_stack?



On 08/02/2019 18:28, Hiroshi Doyu wrote:
>> So, to store the stack for both Unix and freestanding / hvt, you can use
>> the type Mirage_stack.V4.t, and use all functions defined in
>> mirage-stack on that type. Does this make sense?
> 
> Totally it makes sense.
> But this didn't work with "Error: Unbound module Mirage_stack_lwt.V4" as seen 
> in:
> https://github.com/ehirdoy/mirage-skeleton/commit/e4a2a75a2c2bb769ec51a623954512b560fe0853
> 
> Should I include some other package in ~packages [pacakge: 
> mirage-stack(-lwt?)] in config.ml?
> How should I solve this Unbound module issue here?
> 
> Thank you for picking up this issue

I got it to compile with a patch
https://github.com/hannesm/mirage-skeleton/commit/f07cc439371b90b91aab2b587aac9081af2aa7ca
:
- the Mirage_stack_lwt.V4 is a module _type_, not a module (see
https://caml.inria.fr/pub/docs/manual-ocaml/moduleexamples.html#sec20
for further explanation)
- Main is functorized over Mirage_stack_lwt.V4 (the concrete module is
then bound to S) -- using S.t for the ref

- if you want to keep your layout, have a look at
https://github.com/hannesm/mirage-skeleton/commit/1f8fd1772be30ef6a7e453df55bc783b7b335c43
-- crucial to note that MyNet is also functorized now, and the functor
is applied in Main -- where the S is available.

Does this make sense?


hannes

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/mirageos-devel

 


Rackspace

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