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.
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:
Commands are case-sensitive.
Write commands in lowercase.
Install Cabal:
sudo apt install cabal-install
Install the random
package:
cabal update
cabal install --lib random
Try and see if the package is available in GHCi:
$ ghci
...
Prelude> import System.Random
Prelude System.Random>
The things to type are ghci
and import System.Random
.
Remember, uppercase/lowercase matters.