|
@@ -1,4 +1,4 @@
|
|
|
-{-# LANGUAGE OverloadedStrings, TypeFamilies #-}
|
|
|
+{-# LANGUAGE OverloadedStrings, TypeFamilies, MultiParamTypeClasses, FlexibleInstances, UndecidableInstances #-}
|
|
|
|
|
|
{- |
|
|
|
Streamline exports a monad that, given an uniform IO target, emulates
|
|
@@ -53,6 +53,7 @@ import Control.Monad.Trans.Class
|
|
|
import Control.Monad.Trans.Interruptible
|
|
|
import Control.Monad.Trans.Control
|
|
|
import Control.Monad (ap, liftM)
|
|
|
+import Control.Monad.Base
|
|
|
import Control.Monad.IO.Class
|
|
|
import System.IO.Error
|
|
|
import Data.ByteString (ByteString)
|
|
@@ -371,3 +372,11 @@ instance MonadTransControl Streamline where
|
|
|
liftM (\x -> (x, s))
|
|
|
(f $ \t -> withTarget' t s)
|
|
|
restoreT = Streamline . const
|
|
|
+
|
|
|
+instance MonadBase b m => MonadBase b (Streamline m) where
|
|
|
+ liftBase = liftBaseDefault
|
|
|
+
|
|
|
+instance MonadBaseControl b m => MonadBaseControl b (Streamline m) where
|
|
|
+ type StM (Streamline m) a = ComposeSt Streamline m a
|
|
|
+ liftBaseWith = defaultLiftBaseWith
|
|
|
+ restoreM = defaultRestoreM
|