3 ms·
I think he was talking about something like unsafePerformIO. There are plenty of tricks you can not write on pure monads, and there are many Haskell libs that u
by marcosdumay 10y ago
I think he was talking about something like unsafePerformIO. There are plenty of tricks you can not write on pure monads, and there are many Haskell libs that use the unsafePerformIO trick too.
- pka 10y ago> There are plenty of tricks you can not write on pure monads This made me curious, could you list some?
- marcosdumay 10y agoAnything that needs rewriting a memory address without losing time by allocation and garbage collection. Handling IO exceptions and masking them as different errors. Thread, process, or machine coordination in parallel execution.
- pka 10y agoYou don't need unsafePerformIO for any of these. > Anything that needs rewriting a memory address without losing time by allocation and garbage collection. ST gives you mutable references. Or just use IO.
- marcosdumay 10y agoYou need it for doing what the OP is talking about.