blob: 95ecbcdb492ac4c138d780053edf4e97f892f129 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies #-}
module RefInterface where
import Control.Monad
class Monad m => Ref r m | m -> r, r -> m where
newRef :: a -> m (r a)
readRef :: (r a) -> m a
writeRef :: (r a) -> a -> m ()
atomicRef :: m a -> IO a
retryRef :: m a
|