Re: [Haskell-cafe] Conflict with Network.CGI and System.Random

2011-08-23 Thread Alexander Solla
CGI m a is an instance of MonadIO if m is, so import Control.Monad.Trans cgiTMain = do gen <- liftIO getStdGen ... should work. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Conflict with Network.CGI and System.Random

2011-08-23 Thread william murphy
Hello all, I'm trying to write a program to be converted into a cgi file using Network.CGI and Text.Xhtml, and I want to have random numbers in it. Sounds simple, but I need to call the global random generator (I think) and I can't do that in the CGI block, i.e. cgiTMain = do gen <- g