[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [MirageOS-devel] string_of_id for netif
That's still be abstract, annoyingly. The best solution to this is definitely to add 'with sexp' annotations to all the type definitions in mirage-types for v2. I've got a changeset to do that, and it's a better solution than 'string_of' since it permits more complex id types (such as records or config tuples) to be represented in a more structured form than just a flat string. -anil On 14 Aug 2014, at 12:48, Tom Brown <tom.jrbrown@xxxxxxxxx> wrote: > I am using that within the main module, and to print out device id. Printing > out (N.id dev) results in error "Error: This expression has type N.id but an > expression was expected of type string". > As you also mentioned, the problem is that type id is abstract. > > > On Thursday, 14 August 2014, 16:32, Anil Madhavapeddy <anil@xxxxxxxxxx> wrote: > > > On 14 Aug 2014, at 17:22, Tom Brown <tom.jrbrown@xxxxxxxxx> wrote: > > > > It looks that function string_of_id in netif, which returns network > > interface id as a string, doesn't exists any more (the same as > > id_of_string). any suggestion please? > > > What context are you trying to use this in? mirage-net-unix/xen just expose > the type id=string; > > include V1.NETWORK > with type 'a io = 'a Lwt.t > and type page_aligned_buffer = Io_page.t > and type buffer = Cstruct.t > and type id = string > and type macaddr = Macaddr.t > > Are you trying to use it within a JOB functor, where it's still abstract? > I'm plumbing through sexpr conversion functions for that usecase -- or do you > specifically need string for something? > > -anil > > _______________________________________________ > MirageOS-devel mailing list > MirageOS-devel@xxxxxxxxxxxxxxxxxxxx > http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |