[Haskell-cafe] Printing a random list

2008-06-08 Thread Bryan Catanzaro
I'm just starting out with Haskell, and I could use some help. I'm trying to create a random list and print it out, which seems simple enough, but has been giving me problems. Here's what I have: module Main where import IO import Random randomList :: Random a = a -

Re: [Haskell-cafe] Printing a random list

2008-06-08 Thread Don Stewart
catanzar: I'm just starting out with Haskell, and I could use some help. I'm trying to create a random list and print it out, which seems simple enough, but has been giving me problems. Here's what I have: module Main where import IO import Random randomList

Re: [Haskell-cafe] Printing a random list

2008-06-08 Thread Bryan Catanzaro
Thanks for the response, it does compile after I juggled some parentheses around. And also I appreciate the pointer to the better way of making a random list. So that problem is solved. However, when I ran my random list generator, the interpreter had a stack overflow. Here's my code

Re: [Haskell-cafe] Printing a random list

2008-06-08 Thread Ronald Guida
Bryan Catanzaro wrote: However, when I ran my random list generator, the interpreter had a stack overflow. Here's my code again: --- module Main where import IO import Random randomList :: Random a = a - a- [IO a] randomList lbound ubound = randomRIO(lbound,