From e98b0af27bf4aa9c35a67c4d130199c5df8c4a32 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Sun, 22 Oct 2023 23:06:19 +0200 Subject: haskell/cabal-lib: 'eigen' breaks because it's just generally old --- haskell/cabal-lib.html | 20 +++----------------- haskell/cabal-lib.md | 23 +++-------------------- 2 files changed, 6 insertions(+), 37 deletions(-) diff --git a/haskell/cabal-lib.html b/haskell/cabal-lib.html index 90bab1c..9f93c19 100644 --- a/haskell/cabal-lib.html +++ b/haskell/cabal-lib.html @@ -46,7 +46,7 @@ ghci> print "hi" Variable not in scope: print :: base-4.17.2.0:GHC.Base.String -> t ghci> -

I mean, that doesn't look good, doesn't it?

+

I mean, that doesn't look good, does it?

And if that did not scare you enough, suppose that in the future, you want to use a newer version of brick and try to install that using cabal install --lib brick again. What you'll see is this:

$ cabal install --lib brick-1.9
@@ -56,22 +56,8 @@ may break other packages. Use --force-reinstalls to proceed anyway. Packages:
 brick
 

(I simulated the situation by installing an older version instead. I can't time-travel, unfortunately.)

-

Or suppose that you now also want to use another library, say eigen:

-
$ cabal install --lib eigen
-Resolving dependencies...
-Error: cabal: Could not resolve dependencies:
-[__0] next goal: brick (user goal)
-[__0] rejecting:
-brick-1.10/installed-1f76dfaf75736c0f6e2a4a2cf992bb12da05f6bbc7985f9787547739947e4696
-(package is broken, missing dependency
-bimap-0.5.0-2ee7565ca29f0edc78a3c8fe09c9eef36c96d08473660eec8a944cef16ac4d86)
-[__0] trying: brick-1.10
-[__1] trying: vty-5.39 (dependency of brick)
-...
-...
-
-

The error message is much longer than this, but I cut it off to save some space. -Apparently it claims our installation of brick is actually broken, despite it working okay in ghci, but in any case this didn't work.

+

Another thing that would fail is trying to install a package that is incompatible with the versino of brick you have now "installed". +I don't have a good example for this post because I couldn't find a neat pair of incompatible packages that didn't have many other dependencies, but I hope you'll trust me that this will result in the well-known (to seasoned haskellers) cabal dependency resolution errors.

What happened?

Note the line printed by ghci:

Loaded package environment from /home/tom/.ghc/x86_64-linux-9.4.7/environments/default
diff --git a/haskell/cabal-lib.md b/haskell/cabal-lib.md
index acb2bf1..2504fc8 100644
--- a/haskell/cabal-lib.md
+++ b/haskell/cabal-lib.md
@@ -66,7 +66,7 @@ ghci> print "hi"
 ghci>
 ```
 
-I mean, that doesn't look good, doesn't it?
+I mean, that doesn't look good, does it?
 
 And if that did not scare you enough, suppose that in the future, you want to use a newer version of `brick` and try to install that using `cabal install --lib brick` again.
 What you'll see is this:
@@ -81,25 +81,8 @@ brick
 
 (I simulated the situation by installing an older version instead. I can't time-travel, unfortunately.)
 
-Or suppose that you now also want to use another library, say `eigen`:
-
-```
-$ cabal install --lib eigen
-Resolving dependencies...
-Error: cabal: Could not resolve dependencies:
-[__0] next goal: brick (user goal)
-[__0] rejecting:
-brick-1.10/installed-1f76dfaf75736c0f6e2a4a2cf992bb12da05f6bbc7985f9787547739947e4696
-(package is broken, missing dependency
-bimap-0.5.0-2ee7565ca29f0edc78a3c8fe09c9eef36c96d08473660eec8a944cef16ac4d86)
-[__0] trying: brick-1.10
-[__1] trying: vty-5.39 (dependency of brick)
-...
-...
-```
-
-The error message is much longer than this, but I cut it off to save some space.
-Apparently it claims our installation of `brick` is actually broken, despite it working okay in `ghci`, but in any case this didn't work.
+Another thing that would fail is trying to install a package that is incompatible with the versino of `brick` you have now "installed".
+I don't have a good example for this post because I couldn't find a neat pair of incompatible packages that didn't have many other dependencies, but I hope you'll trust me that this will result in the well-known (to seasoned haskellers) cabal dependency resolution errors.
 
 
 ## What happened?
-- 
cgit v1.2.3-54-g00ecf