Discussion: Add safeWithFile function

David Feuer david.feuer at gmail.com
Mon Oct 13 11:57:38 UTC 2014


I was thinking

safeHGetContents :: (NFData a) => Handle -> (String -> a) -> IO a

and/or

safeHGetContents :: (NFData a) => Handle -> (String -> IO a) -> IO a

and/or something more explicitly targeting multiple handles (which I think
there must be a nice way to do, somehow!).


On Mon, Oct 13, 2014 at 3:09 AM, Henning Thielemann <
lemming at henning-thielemann.de> wrote:

>
> On Sun, 12 Oct 2014, David Feuer wrote:
>
>  One possible path is to have a safeHGetContents, along with RULES in
>> Control.DeepSeq to attempt to erase the double deepseq.
>>
>
> Is safeHGetContents the same as
>
>   http://hackage.haskell.org/package/strict-0.3.2/docs/
> System-IO-Strict.html#v:hGetContents
>
> ?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20141013/183367ad/attachment.html>


More information about the Libraries mailing list