[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [MirageOS-devel] Using Result instead of Option in libraries
We have quite a few base libraries that use the pattern of val foo_exn : ... -> 'a @raises val foo: ... -> 'a option Gobbles the exception and returns Some/None Should we take the Mirage3 opportunity to port libraries like Ipaddr to using the Result type instead, so it would be val foo : ... -> ('a, [`Msg of string]) result instead, using the Result type? That would let libraries use combinators such as Rresult, and not gobble errors from parsing silently. It would be an incompatible API bump so we would need to bump all consumers of, e.g. Ipaddr http://docs.mirage.io/ipaddr/Ipaddr_unix.V4.html simultaneously. Anil _______________________________________________ MirageOS-devel mailing list MirageOS-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |