繁体   English   中英

尝试在Haskell中使用CmdArgs时遇到问题(无法加载“ CmdArgs”的接口)

[英]Trouble trying to use CmdArgs in Haskell (Failed to load interface for ‘CmdArgs’)

我目前正在尝试使用CmdArgs,但遇到了一些麻烦。

代码在github上 ,我得到的错误是:

 $ stack build

 gc2-0.1.0.0: configure (lib + exe) Configuring
 gc2-0.1.0.0... gc2-0.1.0.0: build (lib + exe) Preprocessing library
 gc2-0.1.0.0... Preprocessing executable 'gc2-exe' for gc2-0.1.0.0...
 [1 of 1] Compiling Main             ( app/Main.hs,
 .stack-work/dist/x86_64-linux-nopie/Cabal-1.24.2.0/build/gc2-exe/gc2-exe-tmp/Main.o )

 /home/kuwze/src/haskell/gc2/app/Main.hs:6:1: error:
     Failed to load interface for ‘CmdArgs’
     Use -v to see a list of the files searched for.

 --  While building package gc2-0.1.0.0 using:
       /home/kuwze/.stack/setup-exe-cache/x86_64-linux-nopie/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-linux-nopie/Cabal-1.24.2.0 build lib:gc2 exe:gc2-exe --ghc-options " -ddump-hi -ddump-to-file"
     Process exited with code: ExitFailure 1

任何帮助将不胜感激。

原来我像个白痴。

正确的做法是检查库的完整路径。 对于我的示例, CmdArgs的页面指定该模块的库路径为System.Console.CmdArgs

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM