<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"><div dir="auto" style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">The easiest way to work outside of a package is <a href="https://cabal.readthedocs.io/en/latest/getting-started.html#running-a-single-file-haskell-script">https://cabal.readthedocs.io/en/latest/getting-started.html#running-a-single-file-haskell-script</a>. Works pretty well, both in cabal run and cabal repl mode, and you can forget about any cabal *-install commands.<div><br></div><div>Best regards,</div><div>Andrew<br><div><br><blockquote type="cite"><div>On 30 Mar 2024, at 22:33, Henning Thielemann <lemming@henning-thielemann.de> wrote:</div><br class="Apple-interchange-newline"><div><div><br>On Sat, 30 Mar 2024, Volker Wysk wrote:<br><br><blockquote type="cite">Am Freitag, dem 29.03.2024 um 13:48 -0400 schrieb Brandon Allbery:<br><blockquote type="cite">Cabal and stack are designed around the notion of projects, defined by a<br>cabal file (or `package.yaml` if you use Hpack), `stack.yaml` for stack,<br>optional `cabal.project` for cabal. Projects are sandboxed such that the<br>package(s) in the project use consistent versions of all dependencies.<br>Neither tool handles use outside of a project well, although stack has a<br>global configuration (whose use for this is deprecated iirc) and cabal<br>uses ghc's environment files when requested. So something that isn't<br>really intended for use as part of a project isn't well handled by either<br>one.<br></blockquote><br>Sounds complicated. I guess the best way to avoid trouble, is to do<br>everything in projects and avoid code outside of projects.<br></blockquote><br>You can easily turn code outside of a project into code inside a project, by adding something to the 'packages' field in cabal.project or add a separate 'source-repository-package' entry in the cabal.project.<br><br>Or you stick to 'cabal v1-install'.<br>_______________________________________________<br>Haskell-Cafe mailing list<br>To (un)subscribe, modify options or view archives go to:<br>http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe<br>Only members subscribed via the mailman list are allowed to post.</div></div></blockquote></div><br></div></div></body></html>