Logs: liberachat/#haskell
| 2026-01-21 18:21:41 | <gentauro> | they normally go there unless you provide another path |
| 2026-01-21 18:21:59 | <danza> | they say thay can see it |
| 2026-01-21 18:22:25 | <Milan_Vanca> | gentauro: Yes it is there.. but "cabal list --installed" does not show them, but it should as I use install so it should list installed right? |
| 2026-01-21 18:22:42 | <danza> | maybe you changed dir Milan_Vanca? Cabal's scope varies depending on which package one is on |
| 2026-01-21 18:22:43 | <int-e> | cabal list --installed probably only lists libraries |
| 2026-01-21 18:22:46 | <int-e> | ? |
| 2026-01-21 18:22:57 | <gentauro> | Milan_Vanca: if `~/.cabal/bin` is in your PATH, then you should be able to exec and do `which alex` :) |
| 2026-01-21 18:23:28 | <Milan_Vanca> | int-e: So the problem is it is executable and not lib? |
| 2026-01-21 18:23:57 | <int-e> | yeah, it's not a "package" (not in the package database) |
| 2026-01-21 18:24:00 | <Milan_Vanca> | danza: No that's not it :) I am in the same dir. |
| 2026-01-21 18:24:49 | <Milan_Vanca> | gentauro: Yes that works :) I am just confused about "cabal install" and "cabal list --installed" not be connected? |
| 2026-01-21 18:25:02 | <int-e> | (I can see how this is confusing.) |
| 2026-01-21 18:26:37 | <Milan_Vanca> | It looks like it shows same thing as "ghc-pkg list". Also there is "cabal register/unregister" and this goes to db in ghc-pkg? |
| 2026-01-21 18:28:01 | <Milan_Vanca> | so "ghc-pkg list == cabal list --installed" to change this output one needs to "cabal register/unregister" instead of install |
| 2026-01-21 18:28:03 | <int-e> | ...oh wow, v1-register is still around? |
| 2026-01-21 18:28:07 | × | vanishingideal quits (~vanishing@user/vanishingideal) (Ping timeout: 240 seconds) |
| 2026-01-21 18:28:17 | × | divlamir quits (~divlamir@user/divlamir) (Read error: Connection reset by peer) |
| 2026-01-21 18:28:22 | <danza> | you are speaking commands i rarely use, that's interesting |
| 2026-01-21 18:28:37 | → | divlamir joins (~divlamir@user/divlamir) |
| 2026-01-21 18:29:28 | <int-e> | Milan_Vanca: There's `cabal install --lib` but rather than adding to GHC's package database it creates an environment file. Which, annoyingly, is a feature that ghc-pkg isn't aware of. |
| 2026-01-21 18:29:44 | <gentauro> | Milan_Vanca: I'm understanding you want to list `binaries` installed by cabal right? Why not just `ls -lh ~/.cabal/bin`? |
| 2026-01-21 18:30:33 | <danza> | yeah int-e that's why recently i always use cabal from a dir with a .cabal file. Otherwise it gets confusing |
| 2026-01-21 18:30:49 | <int-e> | gentauro: Because, I think, Milan_Vanca is just discovering how cabal[-install] works. |
| 2026-01-21 18:30:54 | <Milan_Vanca> | gentauro: As I want to understand what is going on, which command does what. But as int-e pointed out the situation is more complicated |
| 2026-01-21 18:31:04 | <Milan_Vanca> | int-e: Exactly |
| 2026-01-21 18:31:39 | <Milan_Vanca> | int-e: So cabal install --lib uses "local package db" and ghc-pkg is not aware of that right? |
| 2026-01-21 18:31:46 | × | danza quits (~danza@user/danza) (Quit: got to go) |
| 2026-01-21 18:32:15 | <int-e> | Milan_Vanca: No, environment files are a third mechanic, separate from global and user package db |
| 2026-01-21 18:32:46 | <Milan_Vanca> | int-e: "ghc-pkg --user-package-db" should be able to pick libs installed with "cabal install --lib" ? |
| 2026-01-21 18:33:00 | <Milan_Vanca> | int-e: Aaah :D |
| 2026-01-21 18:33:30 | <int-e> | Their purpose is to be context dependent (you can have an environment in a project directory, and ghc will pick it up unless instructed not to) |
| 2026-01-21 18:33:44 | <int-e> | Milan_Vanca: ghc-pkg will take the user package db into account by default |
| 2026-01-21 18:34:20 | <Milan_Vanca> | Ok so there is global package db, user package db, and project env. |
| 2026-01-21 18:34:22 | <int-e> | It's all rather messy, for historical reasons and possibly having too many cooks. |
| 2026-01-21 18:35:07 | <Milan_Vanca> | Ookey I should just read whole doc and then ask questions :D |
| 2026-01-21 18:35:21 | <Milan_Vanca> | BRB.. and thank you for answers :) |
| 2026-01-21 18:37:44 | <int-e> | Milan_Vanca: for details on environments (including where GHC looks for them), see https://downloads.haskell.org/ghc/latest/docs/users_guide/packages.html#package-environments |
| 2026-01-21 18:38:03 | <Milan_Vanca> | thanks |
| 2026-01-21 18:38:21 | <int-e> | Personally I use GHC_ENVIRONMENT=- which disables them (and then occasionally unset that variable) |
| 2026-01-21 18:38:57 | <int-e> | And then do what danza said: Don't work with standalong ghc(i) at all if there are any non-standard dependencies. |
| 2026-01-21 18:39:04 | <int-e> | *standalone |
| 2026-01-21 18:39:31 | → | vanishingideal joins (~vanishing@user/vanishingideal) |
| 2026-01-21 18:44:37 | → | wootehfoot joins (~wootehfoo@user/wootehfoot) |
| 2026-01-21 18:45:04 | → | humasect joins (~humasect@dyn-192-249-132-90.nexicom.net) |
| 2026-01-21 18:45:10 | <Milan_Vanca> | I am not sure I uderstand.. so when project has dependencies that are not glboaly installed, then its better to "cabal repl" instead of ghci right? |
| 2026-01-21 18:45:29 | × | humasect quits (~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection) |
| 2026-01-21 18:45:54 | → | redshuffle joins (~quassel@45.43.70.75) |
| 2026-01-21 18:46:08 | <int-e> | yeah that's the idea |
| 2026-01-21 18:47:03 | <int-e> | leave the messy bits of informing ghci about the packages to cabal |
| 2026-01-21 18:48:01 | → | humasect joins (~humasect@dyn-192-249-132-90.nexicom.net) |
| 2026-01-21 18:54:44 | → | Tuplanolla joins (~Tuplanoll@85-156-32-207.elisa-laajakaista.fi) |
| 2026-01-21 18:59:10 | → | spew_ joins (~spew@user/spew) |
| 2026-01-21 19:02:02 | → | spew__ joins (~spew@user/spew) |
| 2026-01-21 19:02:27 | × | spew quits (~spew@user/spew) (Killed (NickServ (GHOST command used by spew__))) |
| 2026-01-21 19:02:29 | spew__ | is now known as spew |
| 2026-01-21 19:03:53 | × | spew_ quits (~spew@user/spew) (Ping timeout: 260 seconds) |
| 2026-01-21 19:14:00 | <Milan_Vanca> | Hmmm, how should I understand "broken" package? Is it "not installed"? From ghc docs 5.9.1 "GHC only knows about packages that are installed. Installed packages live in package databases." And "Additionally, some packages may be broken: that is, they are missing from the package database, or one of their dependencies are broken" |
| 2026-01-21 19:14:38 | <Milan_Vanca> | So "installed = in pkg db" "broken = not in pkg db".. I would say broken package is one in pkg db but somehow broken |
| 2026-01-21 19:16:08 | <Milan_Vanca> | And also "or the version number can be omitted in which case GHC will automatically expose the latest non-broken version from the installed versions of the package." So package can be installed and broken at the same time. |
| 2026-01-21 19:17:01 | <int-e> | Milan_Vanca: I guess that's technically correct? ghc-pkg will only list broken packages that are installed though, so you end up with packages that have a missing or broken dependency. |
| 2026-01-21 19:17:42 | <Milan_Vanca> | Ah makes sense |
| 2026-01-21 19:18:07 | <int-e> | Milan_Vanca: The most common way a package breaks would be by upgrading a dependency, which replaces the dependency by a newer version (which is a different package). |
| 2026-01-21 19:18:40 | <int-e> | Also, this mostly happened with older cabal-install (1.x) |
| 2026-01-21 19:19:30 | <Milan_Vanca> | Okey this makes sense.. :) Thank you |
| 2026-01-21 19:19:33 | × | Enrico63 quits (~Enrico63@host-79-42-228-73.retail.telecomitalia.it) (Quit: Client closed) |
| 2026-01-21 19:24:04 | × | vanishingideal quits (~vanishing@user/vanishingideal) (Ping timeout: 255 seconds) |
| 2026-01-21 19:25:04 | × | Zemy quits (~Zemy@72.178.108.235) (Remote host closed the connection) |
| 2026-01-21 19:27:37 | → | Zemy joins (~Zemy@72.178.108.235) |
| 2026-01-21 19:27:46 | × | jreicher quits (~joelr@user/jreicher) (Quit: In transit) |
| 2026-01-21 19:36:29 | × | Googulator quits (~Googulato@77.234.89.65) (Quit: Client closed) |
| 2026-01-21 19:37:03 | → | Googulator joins (~Googulato@77-234-89-65.pool.digikabel.hu) |
| 2026-01-21 19:40:05 | × | Lord_of_Life quits (~Lord@user/lord-of-life/x-2819915) (Ping timeout: 244 seconds) |
| 2026-01-21 19:40:35 | → | Lord_of_Life joins (~Lord@user/lord-of-life/x-2819915) |
| 2026-01-21 19:40:38 | → | target_i joins (~target_i@user/target-i/x-6023099) |
| 2026-01-21 19:49:47 | × | ChaiTRex quits (~ChaiTRex@user/chaitrex) (Quit: ChaiTRex) |
| 2026-01-21 19:51:28 | → | Brumaire_ joins (~no@2a01:e0a:576:3670:a4e5:6ca7:3f9a:ca2) |
| 2026-01-21 19:51:47 | → | ChaiTRex joins (~ChaiTRex@user/chaitrex) |
| 2026-01-21 19:51:58 | × | Brumaire quits (~no@94.140.114.73) (Ping timeout: 244 seconds) |
| 2026-01-21 19:56:18 | × | Lycurgus quits (~juan@user/Lycurgus) (Quit: alsoknownas.renjuan.org ( juan@acm.org )) |
| 2026-01-21 20:10:02 | → | Enrico63 joins (~Enrico63@host-79-42-228-73.retail.telecomitalia.it) |
| 2026-01-21 20:12:39 | × | Brumaire_ quits (~no@2a01:e0a:576:3670:a4e5:6ca7:3f9a:ca2) (Ping timeout: 250 seconds) |
| 2026-01-21 20:14:28 | × | yin quits (~zero@user/zero) (Ping timeout: 255 seconds) |
| 2026-01-21 20:19:51 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-01-21 20:22:54 | → | yin joins (~zero@user/zero) |
| 2026-01-21 20:24:30 | × | trickard quits (~trickard@cpe-93-98-47-163.wireline.com.au) (Read error: Connection reset by peer) |
| 2026-01-21 20:24:43 | → | trickard_ joins (~trickard@cpe-93-98-47-163.wireline.com.au) |
| 2026-01-21 20:24:43 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 246 seconds) |
| 2026-01-21 20:28:38 | × | Enrico63 quits (~Enrico63@host-79-42-228-73.retail.telecomitalia.it) (Quit: Client closed) |
| 2026-01-21 20:35:42 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-01-21 20:40:32 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 244 seconds) |
| 2026-01-21 20:43:42 | → | fp joins (~Thunderbi@2001-14ba-6e24-3000--198.rev.dnainternet.fi) |
| 2026-01-21 20:50:57 | × | humasect quits (~humasect@dyn-192-249-132-90.nexicom.net) (Remote host closed the connection) |
| 2026-01-21 20:51:25 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-01-21 20:55:17 | → | jreicher joins (~joelr@user/jreicher) |
| 2026-01-21 20:56:36 | × | merijn quits (~merijn@host-cl.cgnat-g.v4.dfn.nl) (Ping timeout: 256 seconds) |
| 2026-01-21 21:07:12 | → | merijn joins (~merijn@host-cl.cgnat-g.v4.dfn.nl) |
| 2026-01-21 21:07:58 | → | vanishingideal joins (~vanishing@user/vanishingideal) |
| 2026-01-21 21:09:53 | × | Square3 quits (~Square4@user/square) (Ping timeout: 244 seconds) |
| 2026-01-21 21:10:27 | → | Square2 joins (~Square@user/square) |
| 2026-01-21 21:12:13 | × | takuan quits (~takuan@d8D86B9E9.access.telenet.be) (Ping timeout: 260 seconds) |
All times are in UTC.