Commit d90176cf authored by pcapriotti's avatar pcapriotti

Add MonadIO instance to SimplM.

parent 9bf764be
......@@ -35,6 +35,7 @@ import DynFlags
import CoreMonad
import Outputable
import FastString
import MonadUtils
\end{code}
%************************************************************************
......@@ -153,6 +154,11 @@ instance MonadUnique SimplM where
instance HasDynFlags SimplM where
getDynFlags = SM (\st_env us sc -> return (st_flags st_env, us, sc))
instance MonadIO SimplM where
liftIO m = SM $ \_ us sc -> do
x <- m
return (x, us, sc)
getSimplRules :: SimplM RuleBase
getSimplRules = SM (\st_env us sc -> return (st_rules st_env, us, sc))
......
Markdown is supported
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