gpt4 book ai didi

haskell - 无法通过 `stack install hsdev` 在 Windows 10 上安装 hsev

转载 作者:行者123 更新时间:2023-12-02 15:20:48 25 4
gpt4 key购买 nike

在项目外部和内部运行 stack install hsdev 时出现此错误:

λ stack install hsdev
Run from outside a project, using implicit global project config
Using resolver: lts-5.11 from implicit global project's config file: C:\Users\atc\AppData\Roaming\stack\global-project\stack.yaml
While constructing the BuildPlan the following exceptions were encountered:

-- While attempting to add dependency,
Could not find package hformat in known packages

-- Failure when adding dependencies:
hformat: needed (>=0.1), stack configuration has no specified version (latest applicable is 0.1.0.0)
simple-log: needed (>=0.3.4), stack configuration has no specified version (latest applicable is 0.3.4)
text-region: needed (>=0.1), stack configuration has no specified version (latest applicable is 0.1.0.0)
needed for package hsdev-0.1.8.2

-- While attempting to add dependency,
Could not find package simple-log in known packages

-- While attempting to add dependency,
Could not find package text-region in known packages

Recommended action: try adding the following to your extra-deps in C:\Users\atc\AppData\Roaming\stack\global-project\stack.yaml
- hformat-0.1.0.0
- simple-log-0.3.4
- text-region-0.1.0.0

在尝试此操作之前,我已经运行了stack update。我想安装 hsdev 这样我就可以使用 SublimeHaskell .

堆栈求解器给出:

λ stack solver
Run from outside a project, using implicit global project config
Using resolver: lts-5.11 from implicit global project's config file: C:\Users\atc\AppData\Roaming\stack\global-project\stack.yaml
Using configuration file: AppData\Roaming\stack\global-project\stack.yaml
The following packages are missing from the config:

<snip long list of references to directories in AppData\Local\Temp\stack14228\>

No cabal packages found in AppData\Roaming\stack\global-project\stack.yaml. Please add at least one directory containing a .cabal file. You can also use 'stack init' to automatically generate the config file.

相关堆栈信息:

λ stack --version
Version 1.0.4, Git revision cf18703b1392a96a5a4896a560309e501af63260 (3220 commits) x86_6

最佳答案

我通过以下步骤在我的 Windows 计算机上安装了 hsdev

  1. 运行stack unpack hsdev将hsdev的源码下载到工作目录。
  2. 进入该目录,运行 stack init --solver 以创建正确的 stack.yaml 构建配置。
  3. 运行stack install来构建可执行文件并将其复制到本地 bin 目录。如果堆栈报告有关缺少 LICENSE 文件的错误,请在 ./tests/test-package 下创建一个空的 LICENSE 文件。

关于haskell - 无法通过 `stack install hsdev` 在 Windows 10 上安装 hsev,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36526978/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com