[Haskell-cafe] class Ref...
gracjan at acchsh.com
Tue Jun 7 06:25:50 EDT 2005
I the paper of Magnu Carlsson I noticed small, interesting class:
class Monad m => Ref m r | m -> r where
newRef :: a -> m (r a)
readRef :: r a -> m a
writeRef :: r a -> a -> m ()
He defined it locally, but it seems to be very useful generalization of
IORef and STRef. Is there something like this in standard libraries? I
couldn't find it... :( Is there any reason why isn't it included?
Another question: priority queue. In libraries bundled with ghc we have
Data.Queue, but I couldn't find PriorityQueue. Is there somewhere an
implementation that everybody uses, but is not in the library?
More information about the Haskell-Cafe