Skip to content

Instantly share code, notes, and snippets.

@brunoparga
Last active July 4, 2019 17:43
Show Gist options
  • Save brunoparga/d5aa2d64e50fe4d1619c8c8097dc2120 to your computer and use it in GitHub Desktop.
Save brunoparga/d5aa2d64e50fe4d1619c8c8097dc2120 to your computer and use it in GitHub Desktop.
My issues running course materials with cabal
I'm following the book instructions to try and get their repo set up. My current GHC version is 8.0.2.
Here's what I did, as per the instructions:
$ cabal update
$ cabal get hid-examples
-- seems to work OK, I get the package in its own directory.
$ cabal sandbox init
-- seems to work OK, I have a cabal.sandbox.config and a .cabal-sandbox file in my directory
$ cabal v2-install --only-dependencies
Resolving dependencies...
Up to date
Warning: You asked to install executables, but there are no executables in
targets: . Perhaps you want to use --lib to install libraries instead.
-- this is not the first time I run this command and I lost the output from the first time.
-- is everything okay here? How could I tell? The book does not suggest the --lib option.
$ cabal configure
Warning: The configure command is a part of the legacy v1 style of cabal
usage.
-- (more info about switching to new-configure omitted)
Resolving dependencies...
Warning: solver failed to find a solution:
Could not resolve dependencies:
[__0] trying: hid-examples-0.4 (user goal)
[__1] next goal: base (dependency of hid-examples)
[__1] rejecting: base-4.9.1.0/installed-4.9... (conflict: hid-examples =>
base>=4.10 && <4.13)
[__1] fail (backjumping, conflict set: base, hid-examples)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: hid-examples, base
Trying configure anyway.
Configuring hid-examples-0.4...
cabal: Encountered missing dependencies:
Chart >=1.8 && <1.10,
-- (omitting rest of dependency list)
-- then running cabal (new-)build gives the same issue with the base dependency.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment