opt out of accursedUnutterablePerformIO

Duncan Coutts duncan.coutts at googlemail.com
Mon Mar 5 21:14:12 UTC 2018


On Sun, 2018-03-04 at 11:19 +0100, Ben Franksen wrote:
> I had a program I was working on lately (darcs) crash with a
> segmentation fault after I made a seemingly harmless refactoring. The
> original code was

[...]

> So I looked at the bytestring library to see if there was something
> that could explain the crash. I found that it uses
> accursedUnutterablePerformIO all over the place.

I renamed it that (from inlinePerformIO) to discourage people outside
of the bytestring library from using it! Its use within the bytestring
library has been audited multiple times by multiple people. We're
really pretty confident at this stage that the way it is used in the
library is sound.

> The dire warnings accompanying this "function" (including the
> citation of a number of problem reports against commonly used
> libraries) made me think that it may be worthwhile to offer an opt-
> out for users of libraries like bytestring or text. (Note that I am
> not claiming my particular crash is due to a bug in bytestring, I
> merely want to exclude the possibility.)

We wrote those warnings for other people. We're well aware of them
ourselves!

Duncan



More information about the Libraries mailing list