Comments (3)
Do you have an example where this would be useful? It would be unsafe in the sense that you could write non-deterministic things using it.
from monad-par.
Yes. I actually considered something a bit like this in unordered-containers
(for alterF
), but rejected it for domain-specific performance reasons. It can happen that several different "pure" computations are each capable of capturing information that will be useful for the others. It's possible to take advantage of this by using unsafeDupablePerformIO
to write that information to a reference the other computations can access. But if multiple-put is absolutely prohibited, this won't work.
from monad-par.
Ok, it seems like you might want two versions - unsafeTryPut
that doesn't overwrite and unsafeWrite
that overwrites. I'd be happiest if this could be done without affecting the performance of code that doesn't use these, and the documentation should make it clear which guarantees are lost by using these.
from monad-par.
Related Issues (20)
- Second listing in "Other Slides" 404s HOT 2
- Test suite fails on powerpc HOT 11
- Is it possible to add a MonadFix instance? HOT 1
- ST monad trick HOT 2
- Support more IO operations for ParIO monad HOT 1
- Offer lazy put and newFull
- Can we improve reschedule? HOT 1
- Why is LiftIO the way it is?
- Add CI HOT 1
- Improve exception story
- The Direct module exposes way too much HOT 1
- Harmonize MonadCont for Trace and Direct HOT 2
- Chase-Lev queue looks like trouble HOT 2
- monad-par-0.3.4.8 test suite does not compile with ghc-8.6.1 HOT 3
- monad-par-0.3.4.9 violated PVP by introducing new features HOT 2
- Trace sheduler works as stack, not a queue. HOT 5
- Build failures with mtl-2.3 HOT 2
- `monad-par-0.3.6` build failure with GHC 7.8.4 and 7.10.3 HOT 9
- [Docs Typo]Some links of reference in the comments were outdated HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monad-par.