Last but not least, it's not obvious to me why your stack build --nix command won't succeed, because that command will use Nix to install the proper version of GHC automatically. So if that doesn't work, then my best guess is that you're using an old version of stack where that feature doesn't work properly. I've tried that build using the stack binary that Nix provides, stack 1.3.2, and it can compile a current git checkout of threepenny-gui just fine:$ git clone git://github.com/HeinrichApfelmus/threepenny-gui.gitCloning into 'threepenny-gui'...remote: Counting objects: 4102, done.remote: Total 4102 (delta 0), reused 0 (delta 0), pack-reused 4101Receiving objects: 100% (4102/4102), 1.88 MiB | 581.00 KiB/s, done.Resolving deltas: 100% (2290/2290), done.$ cd threepenny-gui$ stack initLooking for .cabal or package.yaml files to use to init the project.Using cabal packages:- threepenny-gui.cabalSelecting the best among 9 snapshots...* Partially matches lts-7.16 websockets-snap not found - threepenny-gui requires >=0.8 && <0.11 Using package flags: - threepenny-gui: buildexamples = False, network-uri = True, rebug = False* Matches nightly-2017-01-17Selected resolver: nightly-2017-01-17Initialising configuration using resolver: nightly-2017-01-17Total number of user packages considered: 1Writing configuration to file: stack.yamlAll done.$ stack build --nix --nix-packages zlibthreepenny-gui-0.7.1.0: configure (lib)Configuring threepenny-gui-0.7.1.0...threepenny-gui-0.7.1.0: build (lib)Preprocessing library threepenny-gui-0.7.1.0...[...]Registering threepenny-gui-0.7.1.0...此功能无需 nix-shell 的任何经过特殊编辑的配置文件,也不需要 stack 的特殊自定义.This works without any specially edited config files for nix-shell, nor does it require special customization of stack. 这篇关于stack --nix build抱怨ghc版本不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 1403页,肝出来的.. 09-09 01:57