From 78ee2b2f759af679283d5ceb22a99be344bcfabb Mon Sep 17 00:00:00 2001 From: Michael Walker Date: Tue, 10 Feb 2015 01:19:45 +0000 Subject: [PATCH] Add MonadSTM constraint to MonadConc --- Control/Monad/Conc/Class.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Control/Monad/Conc/Class.hs b/Control/Monad/Conc/Class.hs index bfbe287..39ad94b 100755 --- a/Control/Monad/Conc/Class.hs +++ b/Control/Monad/Conc/Class.hs @@ -1,4 +1,5 @@ -{-# LANGUAGE TypeFamilies #-} +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE TypeFamilies #-} -- | This module captures in a typeclass the interface of concurrency -- monads. @@ -35,7 +36,7 @@ import qualified Control.Monad.STM as S -- 'takeCVar' and 'putCVar', however, are very inefficient, and should -- probably always be overridden to make use of -- implementation-specific blocking functionality. -class Monad m => MonadConc m where +class (Monad m, MonadSTM (STMLike m)) => MonadConc m where -- | The associated 'MonadSTM' for this class. type STMLike m :: * -> *