Random Setup
When import System.Random does not work, read this installation guide.
You may have to install the random package. This only needs to happen once.
Codespaces or Simple Computer Install
In the terminal, in the folder you are doing your work, type:
cabal install --lib random --package-env $PWD
The last item is the folder being used. You can write a period .
instead of $PWD
if you want to feel even more mysterious.
Code World
The random package is already included in the CodeWorld environment.
Advanced Computer Install
Open the projectname.cabal
file and add a line random ^>= 1.2.0
to
build-depends
. Here is an example of that section:
build-depends: base ^>=4.17.2.1
, codeworld-api ^>=0.8.1
, text ^>= 2
, random ^>= 1.2.0
, MonadRandom ^>= 0.6