Haskell 编译修改后的 Alonzo 程序时编译器失败

Haskell compiler fails while compiling a Modified Alonzo program

我正在尝试为 Agda 设置 ArchLinux 虚拟机。到目前为止,我已经安装了所需的依赖项和 Agda 本身,但是当我尝试编译一个用 Agda 编写的简单 Hello World 程序时出现 Haskell GHC 错误。下面是场景描述。

已使用 Vagrant 安排了虚拟机。我的配置脚本执行以下包安装:

pacman --noconfirm -Syyu
pacman --noconfirm -Sy ansible vim nano unzip wget git make gcc clang dnsutils
yes | pacman -Sy virtualbox-guest-utils
pacman --noconfirm -Sy emacs
pacman --noconfirm -Sy ghc-static ghc-libs ghc
pacman --noconfirm -Sy cabal-install    
pacman --noconfirm -Sy agda
pacman --noconfirm -Sy agda-stdlib

vagrant up 过程完成后,我进行 SSH 登录并尝试构建并启动一个简单的 Agda helloworld 应用程序,以查看是否一切正常。愚蠢的应用程序如下:

module helloworld where
open import IO

main = run (putStrLn "Hello World")

要使用 Agda 编译它,我使用以下命令:

agda -i /usr/share/agda/lib/ -i . -c helloworld.agda

但是,当编译运行时,出现以下错误:

Calling: ghc -O -o /vagrant/helloworld -Werror -i/vagrant -main-is MAlonzo.Code.Qhelloworld /vagrant/MAlonzo/Code/Qhelloworld.hs --make -fwarn-incomplete-patterns -fno-warn-overlapping-patterns
[ 1 of 78] Compiling MAlonzo.RTE      ( MAlonzo/RTE.hs, MAlonzo/RTE.o )
Compilation error:

MAlonzo/RTE.hs:5:1: error:
    Could not find module ‘Numeric.IEEE’
    There are files missing in the ‘ieee754-0.8.0’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
  |
5 | import Numeric.IEEE ( IEEE(identicalIEEE) )
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

我尝试使用 cabal 安装 ieee754,但它说软件包已经安装。

你知道我怎样才能摆脱它吗?我错过了什么吗?

Here 这是包含虚拟机的 GitHub 仓库。为了重现问题,只需遵循存储库自述文件中的描述即可。

根据 Agda GitHub 页面上 this issue 的建议,这似乎是一个与 Agda 2.5.3 版.

相关的问题

为了解决这个问题,我将 cabal-install 替换为 stack。我的意思是:

pacman --noconfirm -Sy stack

然后,在配置执行后,我按照 GitHub 评论建议说:

just tell stack to install these packages: stack exec --package ieee754 --package text agda. Executions after this can be made using just stack exec agda.

这样做,我能够安装两个缺少的包以进行正确的 MAlonzo 编译。