We have quite a few base libraries that use the pattern of
val foo_exn : ... -> 'a
@raises

Advertising

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@lists.xenproject.org
https://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel