Gabriella439 / Haskell-Pipes-Safe-Library

Safety for the pipes ecosystem
BSD 3-Clause "New" or "Revised" License
26 stars 21 forks source link

Fix stale unmask bug in the code for liftMask #16

Closed twhitehead closed 10 years ago

twhitehead commented 10 years ago

The mistake was pushing the original base monad unmask operation through the entire pipe unmask operation via unsafeHoist as any wait or yield inside the pipe unmask operation results in switching to a new base monad mask and invalidates the previous unmask operation.

Gabriella439 commented 10 years ago

Wow, thanks for taking the time to figure that out! I also greatly appreciate how much you simplified the code. It's much easier to understand now. Now I see the error you're talking about.

twhitehead commented 10 years ago

Hey, no problem! Glad to have a chance to help out a bit.

Hoping to get a chance to take the pipes framework out for a spin sometime soon.