monad-unlift-ref (empty) → 0.2.0
raw patch · 8 files changed
+637/−0 lines, 8 filesdep +basedep +constraintsdep +exceptionssetup-changed
Dependencies added: base, constraints, exceptions, monad-control, monad-unlift, mtl, mutable-containers, resourcet, stm, transformers, transformers-base
Files
- ChangeLog.md +11/−0
- Control/Monad/Trans/RWS/Ref.hs +221/−0
- Control/Monad/Trans/State/Ref.hs +162/−0
- Control/Monad/Trans/Writer/Ref.hs +181/−0
- LICENSE +20/−0
- README.md +5/−0
- Setup.hs +2/−0
- monad-unlift-ref.cabal +35/−0
+ ChangeLog.md view
@@ -0,0 +1,11 @@+## 0.2.0++* Split out monad-unlift-ref++## 0.1.1.0++* Add `MonadResource` instances++## 0.1.0.0++* Initial release
+ Control/Monad/Trans/RWS/Ref.hs view
@@ -0,0 +1,221 @@+{-# LANGUAGE DeriveFunctor #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE UndecidableInstances #-}+-- | An implementation of @RWST@ built on top of mutable references,+-- providing a proper monad morphism.+--+-- An additional advantage of this transformer over the standard @RWST@+-- transformers in the transformers package is that it does not have space+-- leaks in the writer component. For more information, see+-- <https://mail.haskell.org/pipermail/libraries/2012-October/018599.html>.+--+-- Please see the documentation at+-- <https://www.stackage.org/package/monad-unlift> for more details on using+-- this module.+module Control.Monad.Trans.RWS.Ref+ ( RWSRefT+ , runRWSRefT+ , runRWSIORefT+ , runRWSSTRefT+ , module Control.Monad.RWS.Class+ ) where++import Control.Applicative (Applicative (..))+import Control.Monad (ap, liftM)+import Control.Monad.Catch (MonadCatch (..), MonadMask (..),+ MonadThrow (..))+import Control.Monad.IO.Class (MonadIO (..))+import Control.Monad.RWS.Class+import Control.Monad.Trans.Control (defaultLiftBaseWith,+ defaultRestoreM)+import Control.Monad.Trans.Unlift+import Control.Monad.Trans.Resource (MonadResource (..))+import Data.Monoid (Monoid, mappend, mempty)+import Data.Mutable (IORef, MCState, MutableRef,+ PrimMonad, PrimState, RealWorld,+ RefElement, STRef, modifyRef',+ newRef, readRef, writeRef)++-- |+--+-- Since 0.1.0+newtype RWSRefT refw refs r w s m a = RWSRefT+ { unRWSRefT :: r -> refw w -> refs s -> m a+ }+ deriving Functor++-- |+--+-- Since 0.1.0+runRWSRefT+ :: ( Monad m+ , w ~ RefElement (refw w)+ , s ~ RefElement (refs s)+ , MCState (refw w) ~ PrimState b+ , MCState (refs s) ~ PrimState b+ , MonadBase b m+ , MutableRef (refw w)+ , MutableRef (refs s)+ , PrimMonad b+ , Monoid w+ )+ => RWSRefT refw refs r w s m a+ -> r+ -> s+ -> m (a, s, w)+runRWSRefT (RWSRefT f) r s0 = do+ (refw, refs) <- liftBase $ (,) `liftM` newRef mempty `ap` newRef s0+ a <- f r refw refs+ (w, s) <- liftBase $ (,) `liftM` readRef refw `ap` readRef refs+ return (a, s, w)+{-# INLINEABLE runRWSRefT #-}++-- |+--+-- Since 0.1.0+runRWSIORefT+ :: ( Monad m+ , RealWorld ~ PrimState b+ , MonadBase b m+ , PrimMonad b+ , Monoid w+ )+ => RWSRefT IORef IORef r w s m a+ -> r+ -> s+ -> m (a, s, w)+runRWSIORefT = runRWSRefT+{-# INLINE runRWSIORefT #-}++-- |+--+-- Since 0.1.0+runRWSSTRefT+ :: ( Monad m+ , ps ~ PrimState b+ , MonadBase b m+ , PrimMonad b+ , Monoid w+ )+ => RWSRefT (STRef ps) (STRef ps) r w s m a+ -> r+ -> s+ -> m (a, s, w)+runRWSSTRefT = runRWSRefT+{-# INLINE runRWSSTRefT #-}++instance Applicative m => Applicative (RWSRefT refw refs r w s m) where+ pure m = RWSRefT $ \_ _ _ -> pure m+ {-# INLINE pure #-}+ RWSRefT f <*> RWSRefT g = RWSRefT $ \x y z -> f x y z <*> g x y z+ {-# INLINE (<*>) #-}+instance Monad m => Monad (RWSRefT refw refs r w s m) where+ return m = RWSRefT $ \_ _ _ -> return m+ {-# INLINE return #-}+ RWSRefT f >>= g = RWSRefT $ \x y z -> do+ a <- f x y z+ unRWSRefT (g a) x y z+ {-# INLINE (>>=) #-}++instance Monad m => MonadReader r (RWSRefT refw refs r w s m) where+ ask = RWSRefT $ \r _ _ -> return r+ {-# INLINE ask #-}+ local f (RWSRefT g) = RWSRefT $ \r w s -> g (f r) w s+instance ( MCState (refw w) ~ PrimState b+ , Monad m+ , w ~ RefElement (refw w)+ , MutableRef (refw w)+ , PrimMonad b+ , MonadBase b m+ , Monoid w+ )+ => MonadWriter w (RWSRefT refw refs r w s m) where+ writer (a, w) = RWSRefT $ \_ ref _ ->+ liftBase $ modifyRef' ref (`mappend` w) >> return a+ {-# INLINE writer #-}+ tell w = RWSRefT $ \_ ref _ -> liftBase $ modifyRef' ref (`mappend` w)+ {-# INLINE tell #-}+ listen (RWSRefT f) = RWSRefT $ \r _ s -> do+ ref <- liftBase (newRef mempty)+ a <- f r ref s+ w <- liftBase (readRef ref)+ return (a, w)+ {-# INLINEABLE listen #-}+ pass (RWSRefT f) = RWSRefT $ \r ref s -> do+ (a, g) <- f r ref s+ liftBase $ modifyRef' ref g+ return a+ {-# INLINEABLE pass #-}+instance ( MCState (refs s) ~ PrimState b+ , Monad m+ , s ~ RefElement (refs s)+ , MutableRef (refs s)+ , PrimMonad b+ , MonadBase b m+ )+ => MonadState s (RWSRefT refw refs r w s m) where+ get = RWSRefT $ \_ _ -> liftBase . readRef+ {-# INLINE get #-}+ put x = seq x $ RWSRefT $ \_ _ -> liftBase . (`writeRef` x)+ {-# INLINE put #-}+instance ( MCState (refw w) ~ PrimState b+ , MCState (refs s) ~ PrimState b+ , Monad m+ , w ~ RefElement (refw w)+ , s ~ RefElement (refs s)+ , MutableRef (refw w)+ , MutableRef (refs s)+ , PrimMonad b+ , MonadBase b m+ , Monoid w+ )+ => MonadRWS r w s (RWSRefT refw refs r w s m)++instance MonadTrans (RWSRefT refw refs r w s) where+ lift f = RWSRefT $ \_ _ _ -> f+ {-# INLINE lift #-}+instance MonadIO m => MonadIO (RWSRefT refw refs r w s m) where+ liftIO = lift . liftIO+ {-# INLINE liftIO #-}+instance MonadBase b m => MonadBase b (RWSRefT refw refs r w s m) where+ liftBase = lift . liftBase+ {-# INLINE liftBase #-}++instance MonadTransControl (RWSRefT refw refs r w s) where+ type StT (RWSRefT refw refs r w s) a = a+ liftWith f = RWSRefT $ \r w s -> f $ \t -> unRWSRefT t r w s+ restoreT f = RWSRefT $ \_ _ _ -> f+ {-# INLINABLE liftWith #-}+ {-# INLINABLE restoreT #-}++instance MonadBaseControl b m => MonadBaseControl b (RWSRefT refw refs r w s m) where+ type StM (RWSRefT refw refs r w s m) a = StM m a+ liftBaseWith = defaultLiftBaseWith+ restoreM = defaultRestoreM+ {-# INLINE liftBaseWith #-}+ {-# INLINE restoreM #-}++instance MonadThrow m => MonadThrow (RWSRefT refw refs r w s m) where+ throwM = lift . throwM+ {-# INLINE throwM #-}+instance MonadCatch m => MonadCatch (RWSRefT refw refs r w s m) where+ catch (RWSRefT f) g = RWSRefT $ \e w s -> catch (f e w s)+ ((\m -> unRWSRefT m e w s) . g)++instance MonadMask m => MonadMask (RWSRefT refw refs r w s m) where+ mask a = RWSRefT $ \e w s -> mask $ \u -> unRWSRefT (a $ q u) e w s+ where q :: (m a -> m a) -> RWSRefT refw refs r w s m a -> RWSRefT refw refs r w s m a+ q u (RWSRefT b) = RWSRefT (\r w s -> u (b r w s))+ {-# INLINE mask #-}+ uninterruptibleMask a =+ RWSRefT $ \e w s -> uninterruptibleMask $ \u -> unRWSRefT (a $ q u) e w s+ where q :: (m a -> m a) -> RWSRefT refw refs r w s m a -> RWSRefT refw refs r w s m a+ q u (RWSRefT b) = RWSRefT (\r w s -> u (b r w s))+ {-# INLINE uninterruptibleMask #-}++instance MonadResource m => MonadResource (RWSRefT refw refs r w s m) where+ liftResourceT = lift . liftResourceT+ {-# INLINE liftResourceT #-}
+ Control/Monad/Trans/State/Ref.hs view
@@ -0,0 +1,162 @@+{-# LANGUAGE DeriveFunctor #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE UndecidableInstances #-}+-- | An implementation of @StateT@ built on top of mutable references,+-- providing a proper monad morphism.+--+-- Please see the documentation at+-- <https://www.stackage.org/package/monad-unlift> for more details on using+-- this module.+module Control.Monad.Trans.State.Ref+ ( StateRefT+ , runStateRefT+ , runStateIORefT+ , runStateSTRefT+ , module Control.Monad.State.Class+ ) where++import Control.Applicative (Applicative (..))+import Control.Monad.Catch (MonadCatch (..), MonadMask (..),+ MonadThrow (..))+import Control.Monad.IO.Class (MonadIO (..))+import Control.Monad.State.Class+import Control.Monad.Trans.Control (defaultLiftBaseWith,+ defaultRestoreM)+import Control.Monad.Trans.Unlift+import Control.Monad.Trans.Resource (MonadResource (..))+import Data.Mutable (IORef, MCState, MutableRef,+ PrimMonad, PrimState, RealWorld,+ RefElement, STRef, newRef,+ readRef, writeRef)++-- |+--+-- Since 0.1.0+newtype StateRefT ref s m a = StateRefT+ { unStateRefT :: ref s -> m a+ }+ deriving Functor++-- |+--+-- Since 0.1.0+runStateRefT+ :: ( Monad m+ , s ~ RefElement (ref s)+ , MCState (ref s) ~ PrimState b+ , MonadBase b m+ , MutableRef (ref s)+ , PrimMonad b+ )+ => StateRefT ref s m a+ -> s+ -> m (a, s)+runStateRefT (StateRefT f) v0 = do+ ref <- liftBase $ newRef v0+ a <- f ref+ v <- liftBase $ readRef ref+ return (a, v)+{-# INLINEABLE runStateRefT #-}++-- |+--+-- Since 0.1.0+runStateIORefT+ :: ( Monad m+ , RealWorld ~ PrimState b+ , MonadBase b m+ , PrimMonad b+ )+ => StateRefT IORef s m a+ -> s+ -> m (a, s)+runStateIORefT = runStateRefT+{-# INLINE runStateIORefT #-}++-- |+--+-- Since 0.1.0+runStateSTRefT+ :: ( Monad m+ , ps ~ PrimState b+ , MonadBase b m+ , PrimMonad b+ )+ => StateRefT (STRef ps) s m a+ -> s+ -> m (a, s)+runStateSTRefT = runStateRefT+{-# INLINE runStateSTRefT #-}++instance Applicative m => Applicative (StateRefT ref s m) where+ pure = StateRefT . const . pure+ {-# INLINE pure #-}+ StateRefT f <*> StateRefT g = StateRefT $ \x -> f x <*> g x+ {-# INLINE (<*>) #-}+instance Monad m => Monad (StateRefT ref s m) where+ return = StateRefT . const . return+ {-# INLINE return #-}+ StateRefT f >>= g = StateRefT $ \x -> do+ a <- f x+ unStateRefT (g a) x+ {-# INLINE (>>=) #-}+instance ( MCState (ref s) ~ PrimState b+ , Monad m+ , s ~ RefElement (ref s)+ , MutableRef (ref s)+ , PrimMonad b+ , MonadBase b m+ )+ => MonadState s (StateRefT ref s m) where+ get = StateRefT $ liftBase . readRef+ {-# INLINE get #-}+ put x = seq x $ StateRefT $ liftBase . (`writeRef` x)+ {-# INLINE put #-}++instance MonadTrans (StateRefT ref s) where+ lift = StateRefT . const+ {-# INLINE lift #-}+instance MonadIO m => MonadIO (StateRefT ref s m) where+ liftIO = lift . liftIO+ {-# INLINE liftIO #-}+instance MonadBase b m => MonadBase b (StateRefT ref s m) where+ liftBase = lift . liftBase+ {-# INLINE liftBase #-}++instance MonadTransControl (StateRefT ref s) where+ type StT (StateRefT ref s) a = a+ liftWith f = StateRefT $ \r -> f $ \t -> unStateRefT t r+ restoreT = StateRefT . const+ {-# INLINABLE liftWith #-}+ {-# INLINABLE restoreT #-}++instance MonadBaseControl b m => MonadBaseControl b (StateRefT ref s m) where+ type StM (StateRefT ref s m) a = StM m a+ liftBaseWith = defaultLiftBaseWith+ restoreM = defaultRestoreM+ {-# INLINE liftBaseWith #-}+ {-# INLINE restoreM #-}++instance MonadThrow m => MonadThrow (StateRefT ref s m) where+ throwM = lift . throwM+ {-# INLINE throwM #-}+instance MonadCatch m => MonadCatch (StateRefT ref s m) where+ catch (StateRefT f) g = StateRefT $ \e -> catch (f e) ((`unStateRefT` e) . g)++instance MonadMask m => MonadMask (StateRefT ref s m) where+ mask a = StateRefT $ \e -> mask $ \u -> unStateRefT (a $ q u) e+ where q :: (m a -> m a) -> StateRefT ref s m a -> StateRefT ref s m a+ q u (StateRefT b) = StateRefT (u . b)+ {-# INLINE mask #-}+ uninterruptibleMask a =+ StateRefT $ \e -> uninterruptibleMask $ \u -> unStateRefT (a $ q u) e+ where q :: (m a -> m a) -> StateRefT ref s m a -> StateRefT ref s m a+ q u (StateRefT b) = StateRefT (u . b)+ {-# INLINE uninterruptibleMask #-}++instance MonadResource m => MonadResource (StateRefT ref s m) where+ liftResourceT = lift . liftResourceT+ {-# INLINE liftResourceT #-}
+ Control/Monad/Trans/Writer/Ref.hs view
@@ -0,0 +1,181 @@+{-# LANGUAGE DeriveFunctor #-}+{-# LANGUAGE FlexibleContexts #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE UndecidableInstances #-}+-- | An implementation of @WriterT@ built on top of mutable references,+-- providing a proper monad morphism.+--+-- An additional advantage of this transformer over the standard @WriterT@+-- transformers in the transformers package is that it does not have space+-- leaks. For more information, see+-- <https://mail.haskell.org/pipermail/libraries/2012-October/018599.html>.+--+-- Please see the documentation at+-- <https://www.stackage.org/package/monad-unlift> for more details on using+-- this module.+module Control.Monad.Trans.Writer.Ref+ ( WriterRefT+ , runWriterRefT+ , runWriterIORefT+ , runWriterSTRefT+ , module Control.Monad.Writer.Class+ ) where++import Control.Applicative (Applicative (..))+import Control.Monad.Catch (MonadCatch (..), MonadMask (..),+ MonadThrow (..))+import Control.Monad.IO.Class (MonadIO (..))+import Control.Monad.Trans.Control (defaultLiftBaseWith,+ defaultRestoreM)+import Control.Monad.Trans.Unlift+import Control.Monad.Trans.Resource (MonadResource (..))+import Control.Monad.Writer.Class+import Data.Monoid (Monoid, mappend, mempty)+import Data.Mutable (IORef, MCState, MutableRef,+ PrimMonad, PrimState, RealWorld,+ RefElement, STRef, modifyRef',+ newRef, readRef, writeRef)++-- |+--+-- Since 0.1.0+newtype WriterRefT ref w m a = WriterRefT+ { unWriterRefT :: ref w -> m a+ }+ deriving Functor++-- |+--+-- Since 0.1.0+runWriterRefT+ :: ( Monad m+ , w ~ RefElement (ref w)+ , MCState (ref w) ~ PrimState b+ , MonadBase b m+ , MutableRef (ref w)+ , PrimMonad b+ , Monoid w+ )+ => WriterRefT ref w m a+ -> m (a, w)+runWriterRefT (WriterRefT f) = do+ ref <- liftBase $ newRef mempty+ a <- f ref+ v <- liftBase $ readRef ref+ return (a, v)+{-# INLINEABLE runWriterRefT #-}++-- |+--+-- Since 0.1.0+runWriterIORefT+ :: ( Monad m+ , RealWorld ~ PrimState b+ , MonadBase b m+ , PrimMonad b+ , Monoid w+ )+ => WriterRefT IORef w m a+ -> m (a, w)+runWriterIORefT = runWriterRefT+{-# INLINE runWriterIORefT #-}++-- |+--+-- Since 0.1.0+runWriterSTRefT+ :: ( Monad m+ , ps ~ PrimState b+ , MonadBase b m+ , PrimMonad b+ , Monoid w+ )+ => WriterRefT (STRef ps) w m a+ -> m (a, w)+runWriterSTRefT = runWriterRefT+{-# INLINE runWriterSTRefT #-}++instance Applicative m => Applicative (WriterRefT ref w m) where+ pure = WriterRefT . const . pure+ {-# INLINE pure #-}+ WriterRefT f <*> WriterRefT g = WriterRefT $ \x -> f x <*> g x+ {-# INLINE (<*>) #-}+instance Monad m => Monad (WriterRefT ref w m) where+ return = WriterRefT . const . return+ {-# INLINE return #-}+ WriterRefT f >>= g = WriterRefT $ \x -> do+ a <- f x+ unWriterRefT (g a) x+ {-# INLINE (>>=) #-}+instance ( MCState (ref w) ~ PrimState b+ , Monad m+ , w ~ RefElement (ref w)+ , MutableRef (ref w)+ , PrimMonad b+ , MonadBase b m+ , Monoid w+ )+ => MonadWriter w (WriterRefT ref w m) where+ writer (a, w) = WriterRefT $ \ref ->+ liftBase $ modifyRef' ref (`mappend` w) >> return a+ {-# INLINE writer #-}+ tell w = WriterRefT $ \ref -> liftBase $ modifyRef' ref (`mappend` w)+ {-# INLINE tell #-}+ listen (WriterRefT f) = lift $ do+ ref <- liftBase (newRef mempty)+ a <- f ref+ w <- liftBase (readRef ref)+ return (a, w)+ {-# INLINEABLE listen #-}+ pass (WriterRefT f) = WriterRefT $ \ref -> do+ (a, g) <- f ref+ liftBase $ modifyRef' ref g+ return a+ {-# INLINEABLE pass #-}++instance MonadTrans (WriterRefT ref w) where+ lift = WriterRefT . const+ {-# INLINE lift #-}+instance MonadIO m => MonadIO (WriterRefT ref w m) where+ liftIO = lift . liftIO+ {-# INLINE liftIO #-}+instance MonadBase b m => MonadBase b (WriterRefT ref w m) where+ liftBase = lift . liftBase+ {-# INLINE liftBase #-}++instance MonadTransControl (WriterRefT ref w) where+ type StT (WriterRefT ref w) a = a+ liftWith f = WriterRefT $ \r -> f $ \t -> unWriterRefT t r+ restoreT = WriterRefT . const+ {-# INLINABLE liftWith #-}+ {-# INLINABLE restoreT #-}++instance MonadBaseControl b m => MonadBaseControl b (WriterRefT ref w m) where+ type StM (WriterRefT ref w m) a = StM m a+ liftBaseWith = defaultLiftBaseWith+ restoreM = defaultRestoreM+ {-# INLINE liftBaseWith #-}+ {-# INLINE restoreM #-}++instance MonadThrow m => MonadThrow (WriterRefT ref w m) where+ throwM = lift . throwM+ {-# INLINE throwM #-}+instance MonadCatch m => MonadCatch (WriterRefT ref w m) where+ catch (WriterRefT f) g = WriterRefT $ \e -> catch (f e) ((`unWriterRefT` e) . g)++instance MonadMask m => MonadMask (WriterRefT ref w m) where+ mask a = WriterRefT $ \e -> mask $ \u -> unWriterRefT (a $ q u) e+ where q :: (m a -> m a) -> WriterRefT ref w m a -> WriterRefT ref w m a+ q u (WriterRefT b) = WriterRefT (u . b)+ {-# INLINE mask #-}+ uninterruptibleMask a =+ WriterRefT $ \e -> uninterruptibleMask $ \u -> unWriterRefT (a $ q u) e+ where q :: (m a -> m a) -> WriterRefT ref w m a -> WriterRefT ref w m a+ q u (WriterRefT b) = WriterRefT (u . b)+ {-# INLINE uninterruptibleMask #-}++instance MonadResource m => MonadResource (WriterRefT ref w m) where+ liftResourceT = lift . liftResourceT+ {-# INLINE liftResourceT #-}
+ LICENSE view
@@ -0,0 +1,20 @@+Copyright (c) 2015 Michael Snoyman++Permission is hereby granted, free of charge, to any person obtaining+a copy of this software and associated documentation files (the+"Software"), to deal in the Software without restriction, including+without limitation the rights to use, copy, modify, merge, publish,+distribute, sublicense, and/or sell copies of the Software, and to+permit persons to whom the Software is furnished to do so, subject to+the following conditions:++The above copyright notice and this permission notice shall be included+in all copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+ README.md view
@@ -0,0 +1,5 @@+## monad-unlift-ref++[](https://travis-ci.org/fpco/monad-unlift)++Provides some concrete transformer implementations based on [monad-unlift](https://www.stackage.org/package/monad-unlift). See that package for more information.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ monad-unlift-ref.cabal view
@@ -0,0 +1,35 @@+name: monad-unlift-ref+version: 0.2.0+synopsis: Typeclasses for representing monad transformer unlifting+description: See README.md+homepage: https://github.com/fpco/monad-unlift+license: MIT+license-file: LICENSE+author: Michael Snoyman+maintainer: michael@fpcomplete.com+copyright: FP Complete+category: Control+build-type: Simple+extra-source-files: README.md ChangeLog.md+cabal-version: >=1.10++library+ exposed-modules: Control.Monad.Trans.State.Ref+ Control.Monad.Trans.Writer.Ref+ Control.Monad.Trans.RWS.Ref+ build-depends: base >= 4.6 && < 5+ , monad-control >= 1.0 && < 1.1+ , monad-unlift >= 0.2 && < 0.3+ , transformers+ , mtl+ , transformers-base+ , mutable-containers >= 0.3 && < 0.4+ , exceptions >= 0.6+ , stm+ , constraints+ , resourcet+ default-language: Haskell2010++source-repository head+ type: git+ location: https://github.com/fpco/monad-unlift.git