Commit 13d2bd1d authored by Alexander Vieth's avatar Alexander Vieth
Browse files

MonadFix instance for InputT

parent f18a911b
......@@ -15,6 +15,7 @@ import System.Directory(getHomeDirectory)
import System.FilePath
import Control.Applicative
import Control.Monad (liftM, ap)
import Control.Monad.Fix
import System.IO
import Data.IORef
......@@ -56,6 +57,9 @@ newtype InputT m a = InputT {unInputT ::
instance MonadTrans InputT where
lift = InputT . lift . lift . lift . lift . lift
instance ( MonadFix m ) => MonadFix (InputT m) where
mfix f = InputT (mfix (unInputT . f))
-- | Get the current line input history.
getHistory :: MonadIO m => InputT m History
getHistory = InputT get
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment