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.