[Haskell-cafe] Conflict with Network.CGI and System.Random
will.t.murphy at gmail.com
Wed Aug 24 01:50:05 CEST 2011
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 <- getStdGen
simply doesn't work, nor an variation of calling a function in the
cgiTMainblock with a type of IO(), which is what I need to get the
generator. Is it
impossible both to write a program using Network.CGI and have random values?
That seems very limiting, the people that wrote Haskell were smarter than
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe