CGI m a is an instance of MonadIO if m is, so import Control.Monad.Trans cgiTMain = do gen <- liftIO getStdGen ... should work. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110823/6666cd61/attachment.htm>