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

Re: [MirageOS-devel] Using Result instead of Option in libraries



On 14/10/2016 15:18, Anil Madhavapeddy wrote:
> This is largely within libraries, so the impact wouldn't be too bad.  I do 
> notice that PCLOCK, MCLOCK and IP types do use option to signify failure 
> though, which would be mirage-types churn...

Well, in mirage-types we use (sometimes) `unit Lwt.t`, and other times
`[ `Ok of unit | `Eof | `Error of _ ] Lwt.t`, which we could^Wshould
unify and use `('a, error) result Lwt.t`.

Please see and comment https://github.com/mirage/mirage-dev/pull/166 and
https://github.com/mirage/mirage/pull/615 where I started to change to
the NETWORK module type.


hannes

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
https://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®.