Based a quick perusal of Hackage there does not seem to be a lot of work in this area. Of course, for Haskell the importance of this topic may be diminished relative to pure data structures, but for doing systems-level work like monad par good concurrent data structures are also very important.
We are about to embark on some work to fix this problem for monad-par & Deques, but if there are others working in this vicinity it would be nice to team up.We are going to try both pure Haskell approaches using the new casMutVar# primop as well as wrapping foreign data structures such as those provided by TBB. There are a whole bunch of issues with the latter -- see Appendix A and help me out if you know how to do this.
Hi Ryan,
For work stealing in particular, take a look at Karl-Filip Faxen’s Wool library:
He has investigated many different implementations of work-stealing queues, and Wool has a few nice tricks that improve on algorithms like the Chase/Lev work-stealing deque that we use in the GHC RTS.
Cheers,
Simon
You may want to add yourself to the CC list of ticket:
http://hackage.haskell.org/trac/ghc/ticket/4259
Even better: add a description to the ticket of your use-case of
overlapping type family instances.
Bas
On Wed, Nov 2, 2011 at 2:21 PM, Ryan Newton <rrne...@gmail.com> wrote:Disregarding that... the big problem in this case is the inability to create overlapping type family instances.In this case what we dearly WANT to do is specialize some subset of the 64-mode configuration space and then have a "fallback". You can take a look at my struggling in MegaDeque. Both of my approaches require specifying explicitly the modes that you don't
Worse, we may want to specialize on element type as well. For example, for simple scalar types (or even Storable types) it may be desirable to use something foreign, like TBB queues. But in that case, there's no way to enumerate the types NOT specialized. As far as I know there is no way for type families to accomplish this (specialize, say "Int", and have a fallback for everything else). In general, is there a recognized work-around for this? For example, is this a place where using functional dependencies instead might do the trick?