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

Re: [MirageOS-devel] Irmin roadmap



Le mercredi, 26 novembre 2014 Ã 01:09, Thomas Gazagnaire a Ãcrit :
> Please feel free to comment if you find something which is not clear or which 
> could be improved.
Very quick look. The semantics of timestamps is unspecified:

http://samoht.github.io/irmin/Irmin.Task.html#VALdate

Also the uniqueness scope of task uids should be precised.

Besides I see you are using universal values. I don't know if that's useful but 
you may want to enrich the type a little bit so that you are able to print some 
diagnostics about them without knowing the client keys. The idea is that client 
should give a to_string function when they create the key, you can then simply 
hack a to_string function on universal types using this. There may be more 
elegant ways but here is one solution (also I would have suggested Formatter, 
but you may not want to introduce that dependency, see also the types of 
Task.{create,fprintf} ):

type univ = { u : exn; str : unit -> string }

let univ_create (type s) to_string =
  let module M = struct exception E of s end in
  (fun v -> { u = M.E v; str = (fun () -> to_string v) }),
  (function { u = M.E v } -> Some v | _ -> None)

let to_string u = u.str ()

Of course the same idea can be applied to other processors you may want on 
universal values (e.g. marshal).

Daniel








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

 


Rackspace

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