reactive-banana icon indicating copy to clipboard operation
reactive-banana copied to clipboard

Potential Bug: usage of unsafePerformIO?

Open fbinz opened this issue 12 years ago • 1 comments

In Reactive.Banana.Internal.PulseLatch0 you are using unsafePerformIO several times without using a NOINLINE pragma. Is this intentional or could problems as described in the documentation arise?

fbinz avatar Aug 27 '12 13:08 fbinz

That's good point.

The uses of unsafePerformIO in the module PulseLatch0 are both harmless and unnecessary; the only trouble is let-floating, which I have carefully avoided.

In contrast, the use of unsafePerformIO for sharing in the Cached module is more serious, and that's why it also has a NOINLINE pragma.

Still, the ramifications of unsafePerformIO are a little difficult to survey, so I should probably err on the side of caution and add the various flags.

HeinrichApfelmus avatar Aug 28 '12 17:08 HeinrichApfelmus