If you use Stack then you can add a .cabal file to your project that indicates what it depends on. Here's an example I use:

https://github.com/JeffreyBenjaminBrown/montevideo/blob/master/mtv-util/mtv-util.cabal

(It uses the `random` package too; if you search for "random"  you'll find the dependencies.)

Stack has global config options too:
https://docs.haskellstack.org/en/stable/yaml_configuration/
which seems likely to offer the same capability; I don't know how to do it that way as I always work within a project with a cabal file.

On Wed, Feb 17, 2021 at 2:08 AM Francesco Ariis <fa-ml@ariis.it> wrote:
Il 16 febbraio 2021 alle 20:49 A. Mc. ha scritto:
> I'm attempting to install and update the .yaml file so I don't have to run
> the command $ stack ghci --package random every single time I want to load
> a module that imports System.Random.  Or maybe I need to use chocolatey?

No idea with stack, but with cabal is:

    cabal install --lib random
_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


--
Jeff Brown | Jeffrey Benjamin Brown
LinkedIn   |   Github   |   Twitter  |  Facebook  |  very old Website