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

Dan Stromberg strombrg at gmail.com
Thu Dec 10 01:35:07 UTC 2015


On Wed, Dec 9, 2015 at 4:57 PM, Kim-Ee Yeoh <ky3 at atamo.com> wrote:

>
>
> On Thu, Dec 10, 2015 at 4:19 AM, Dan Stromberg <strombrg at gmail.com> wrote:
>
> 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?
>
>
> Making sense of this question requires an apples-to-apples comparison.
> Observe that the original code doesn't deal with read errors either.
>
> In fact, the replies in this thread have done only two things.
>
> They've fixed the typecheck error.
>
> And they've offered idiomatic -- but semantically identical -- rewritings
> that read-fault in the exact same way as the original code.
>

Yes, sure.

My thought was that going over the list of filenames+sizes and adding
prefix hashes where available, would be easier to make robust, than
attempting to get prefix hashes for all and zipping the results.

Is that not correct?

Should I use a Maybe to deal with files that don't hash, so there will
always be a one-to-one correspondence, allowing a zip?

Thanks.


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


More information about the Beginners mailing list