I installed the System.Random package with cabal (Prelude System.Random >), but when I compile a simple program like this:
threeCoins :: StdGen -> (Bool, Bool, Bool)
threeCoins gen =
let (firstCoin, newGen) = random gen
(secondCoin, newGen’) = random newGen
(thirdCoin, newGen’’) = random newGen’
in (firstCoin, secondCoin, thirdCoin)
a message tell me that StdGen it’s not a recognized type. I’m going crazy with that. Someone can explain me what’s wrong?