haskellrandomsystemcabalcabal-install

How to resolve the import System.Random?


I get the error that couldn´t find module System.Random and I tried to do Cabal Update ; Cabal Install Random and Cabal update --lib random, in Windowns, and it assumes the same error.

I also have Ubuntu in a Virtual Box/Machine and I tried to do sudo apt-get install cabal update and it assumes, also, the same error.


Solution

  • The shortest path I can think of is: Consider installing Haskell Platform.

    It comes with GHC and some pre-installed packages including random.

    Otherwise, instead, on Ubuntu: