[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell-cafe
Subject:    Re: [Haskell-cafe] Cabal install fails, don't understand why
From:       Andrew Lelechenko <andrew.lelechenko () gmail ! com>
Date:       2024-03-31 16:52:25
Message-ID: A0C2BFF9-F464-40EA-883E-E313611ADEA4 () gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


The easiest way to work outside of a package is \
https://cabal.readthedocs.io/en/latest/getting-started.html#running-a-single-file-haskell-script. \
Works pretty well, both in cabal run and cabal repl mode, and you can forget about \
any cabal *-install commands.

Best regards,
Andrew

> On 30 Mar 2024, at 22:33, Henning Thielemann <lemming@henning-thielemann.de> wrote:
> 
> 
> On Sat, 30 Mar 2024, Volker Wysk wrote:
> 
> > Am Freitag, dem 29.03.2024 um 13:48 -0400 schrieb Brandon Allbery:
> > > Cabal and stack are designed around the notion of projects, defined by a
> > > cabal file (or `package.yaml` if you use Hpack), `stack.yaml` for stack,
> > > optional `cabal.project` for cabal. Projects are sandboxed such that the
> > > package(s) in the project use consistent versions of all dependencies.
> > > Neither tool handles use outside of a project well, although stack has a
> > > global configuration (whose use for this is deprecated iirc) and cabal
> > > uses ghc's environment files when requested. So something that isn't
> > > really intended for use as part of a project isn't well handled by either
> > > one.
> > 
> > Sounds complicated. I guess the best way to avoid trouble, is to do
> > everything in projects and avoid code outside of projects.
> 
> 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. 
> Or you stick to 'cabal v1-install'.
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.


[Attachment #5 (unknown)]

<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&nbsp;<a \
href="https://cabal.readthedocs.io/en/latest/getting-started.html#running-a-single-fil \
e-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 &lt;lemming@henning-thielemann.de&gt; 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>


[Attachment #6 (text/plain)]

_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic