From: PHO Date: Wed, 14 Dec 2011 08:16:56 +0000 (+0900) Subject: Make 'Rsrc a' an instance of MonadFix. X-Git-Url: https://git.cielonegro.org/gitweb.cgi?a=commitdiff_plain;h=ddf98ebb585d1243e4982977c75c244f45bb3bf2;p=Lucu.git Make 'Rsrc a' an instance of MonadFix. --- diff --git a/Network/HTTP/Lucu/Resource/Internal.hs b/Network/HTTP/Lucu/Resource/Internal.hs index a19339c..e5c38e7 100644 --- a/Network/HTTP/Lucu/Resource/Internal.hs +++ b/Network/HTTP/Lucu/Resource/Internal.hs @@ -38,6 +38,7 @@ import Control.Concurrent import Control.Concurrent.STM import Control.Exception import Control.Monad hiding (mapM_) +import Control.Monad.Fix import Control.Monad.IO.Class import Control.Monad.Reader (ReaderT, runReaderT, ask) import Control.Monad.Unicode @@ -75,7 +76,7 @@ newtype Rsrc a = Rsrc { unRsrc ∷ ReaderT NormalInteraction IO a } - deriving (Applicative, Functor, Monad, MonadIO) + deriving (Applicative, Functor, Monad, MonadFix, MonadIO) runRsrc ∷ Rsrc a → NormalInteraction → IO a runRsrc = runReaderT ∘ unRsrc