[Haskell-beginners] Add Global Package

Jeffrey Brown jeffbrown.the at gmail.com
Wed Feb 17 13:07:19 UTC 2021


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 at 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 at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>


-- 
Jeff Brown | Jeffrey Benjamin Brown
LinkedIn <https://www.linkedin.com/in/jeffreybenjaminbrown>   |   Github
<https://github.com/jeffreybenjaminbrown>   |   Twitter
<https://twitter.com/carelogic>  |  Facebook
<https://www.facebook.com/mejeff.younotjeff>  |  very old Website
<https://msu.edu/~brown202/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20210217/1d4fe747/attachment.html>


More information about the Beginners mailing list