I think one of the most common stuffs to build when learning a programming language is web app, so when learning Haskell, I decided to give Snap a try.
I’m on macOS Monterey (x64), didn’t install GHC via Homebrew. Used ghcup, instead
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh
This is what I got when running ghcup tui
GHCup 0.1.22.0 (latest, recommended)
Stack 2.15.5 (recommended)
HLS 2.7.0.0 (recommended)
cabal 3.10.3.0 (latest,recommended)
GHC 9.8.2
Let’s install snap:
$ cabal update
$ cabal install snap snap-templates
Then create a Snap project:
$ mkdir snapdtest
$ cd snaptest
$ snap init barebones
$ cabal install
Got these errors:
Error: cabal: Could not resolve dependencies:
[__0] trying: snaptest-0.1 (user goal)
[__1] next goal: bytestring (dependency of snaptest)
[__1] rejecting: bytestring-0.12.1.0/installed-ab96 (conflict: snaptest =>
bytestring>=0.9.1 && <0.11)
[__1] skipping: bytestring-0.12.1.0, bytestring-0.12.0.2, bytestring-0.12.0.1,
bytestring-0.12.0.0, bytestring-0.11.5.3, bytestring-0.11.5.2,
bytestring-0.11.5.1, bytestring-0.11.5.0, bytestring-0.11.4.0,
bytestring-0.11.3.1, bytestring-0.11.3.0, bytestring-0.11.2.0,
bytestring-0.11.1.0, bytestring-0.11.0.0 (has the same characteristics that
caused the previous version to fail: excluded by constraint '>=0.9.1 && <0.11'
from 'snaptest')
[__1] trying: bytestring-0.10.12.1
[__2] next goal: base (dependency of snaptest)
[__2] rejecting: base-4.19.1.0/installed-654f (conflict: bytestring =>
base>=4.2 && <4.16)
[__2] skipping: base-4.20.0.1, base-4.20.0.0, base-4.19.1.0, base-4.19.0.0,
base-4.18.2.1, base-4.18.2.0, base-4.18.1.0, base-4.18.0.0, base-4.17.2.1,
base-4.17.2.0, base-4.17.1.0, base-4.17.0.0, base-4.16.4.0, base-4.16.3.0,
base-4.16.2.0, base-4.16.1.0, base-4.16.0.0 (has the same characteristics that
caused the previous version to fail: excluded by constraint '>=4.2 && <4.16'
from 'bytestring')
[__2] rejecting: base-4.15.1.0, base-4.15.0.0, base-4.14.3.0, base-4.14.2.0,
base-4.14.1.0, base-4.14.0.0, base-4.13.0.0, base-4.12.0.0, base-4.11.1.0,
base-4.11.0.0, base-4.10.1.0, base-4.10.0.0, base-4.9.1.0, base-4.9.0.0,
base-4.8.2.0, base-4.8.1.0, base-4.8.0.0, base-4.7.0.2, base-4.7.0.1,
base-4.7.0.0, base-4.6.0.1, base-4.6.0.0, base-4.5.1.0, base-4.5.0.0,
base-4.4.1.0, base-4.4.0.0, base-4.3.1.0, base-4.3.0.0, base-4.2.0.2,
base-4.2.0.1, base-4.2.0.0, base-4.1.0.0, base-4.0.0.0, base-3.0.3.2,
base-3.0.3.1 (constraint from non-upgradeable package requires installed
instance)
[__2] fail (backjumping, conflict set: base, bytestring, snaptest)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: bytestring, base, snaptest
How to solve this?