[darcs-devel] Code review request for patch

Ernesto Rodriguez neto at netowork.me
Sat Dec 20 18:10:35 UTC 2014


Dear all,

I have been working on improving the error messages for situations where
ssh & scp (http://bugs.darcs.net/issue822) are unable to find the hostname.
When such things happen, scp & ssh exit with code -1, so the only way to
know what went wrong is inspecting the standard error.

The current structure of the code didn't allow any easy way to propagate
and report the error other than throwning an exception (which is not the
best way to fail). In order to make exceptions work nicely, I decided
generalizing the type of certain functions so for most cases, the signature
will be instantiated to the IO monad (as before) but if the programmer
wishes, the type can be instantiated such that the exceptions are now
visible in the type signature.

I think it is a much better approach to slowly move code such that
exceptions become visible in the type and the method I implemented in this
patch dosen't break existing code and allows exceptions to be visible in
the type when convenient. Please let me know about feedback & questions.

Best regards,

-- 
Ernesto Rodriguez

Masters Student
Computer Science
Utrecht University

www.netowork.me
github.com/netogallo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20141220/25fdb2e6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: io-patch.patch
Type: text/x-patch
Size: 69185 bytes
Desc: not available
URL: <http://lists.osuosl.org/pipermail/darcs-devel/attachments/20141220/25fdb2e6/attachment-0001.bin>


More information about the darcs-devel mailing list