尝试在Haskell中使用CMDARGS的麻烦(无法为“ 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

最新更新