[Haskell-beginners] More type errors I'm having trouble with

Dan Stromberg strombrg at gmail.com
Wed Dec 9 21:19:28 UTC 2015


Hi.

On Fri, Dec 4, 2015 at 12:35 AM, Daniel Trstenjak <
daniel.trstenjak at gmail.com> wrote:

>
>
> Looking at your code, it's easier not to put the `IO String` computation
> of the hash into a tuple, but first compute all hashes:
>
>    hashes <- sequence (map Md5s.prefix_md5 filenames)
>
>
> And if you want the hash and the filename grouped in a tuple:
>
>    zip filenames hashes


What if I want to be able to deal gracefully with files that aren't
readable, whether due to permissions issues or I/O errors?  I agree that
zip'ing is easier, but is it as robust?

Thanks.

-- 
Dan Stromberg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20151209/d0cc3795/attachment.html>


More information about the Beginners mailing list