module Main where import Random main = do -- Either of these work --rnum <- oneRandNum let rnum = oneRandNum -- But only let works here. Why? --numbers <- randArray let numbers = randArray -- Required for successful compilation. print "foo" oneRandNum :: IO Int oneRandNum = getStdRandom( randomR( 0, 9 ) ) randArray :: [IO Int] randArray = [oneRandNum]
You need to create an account or log in to post comments to this site.