Stack does have a notion of a global project, which it uses if you're not in a project directory. The error message you received:

  Error: While constructing the build plan, the following exceptions
  were encountered:

  In the dependencies for xmonad-contrib-0.13:
      X11-xft must match >=0.2, but the stack configuration has no
      specified version (latest applicable is 0.3.1)

  Recommended action: try adding the following to your extra-deps in
  /home/jun/.stack/global-project/stack.yaml:
  - X11-xft-0.3.1

tells you how to make X11-xft-0.3.1 available to the global project, which should allow you to install xmonad-contrib into this global package.

Matt Parsons

On Fri, Mar 10, 2017 at 10:33 AM, Brandon Allbery <allbery.b@gmail.com> wrote:

On Fri, Mar 10, 2017 at 12:28 PM, Jun Inoue <jun.lambda@gmail.com> wrote:
Am I fundamentally misunderstanding how stack is supposed to be used?

Stack is not a package manager. It is a reproducible builds tool. Ad hoc usage like you are doing is outside of its purview.

Also, last I checked, for some reason xmonad-contrib wasn't in stackage, so stack's primary mechanism for avoiding conflicts fails.

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

_______________________________________________
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.