简体   繁体   English

如何获得Cabal / Stack发出的GHC命令?

[英]How to get GHC command as issued by Cabal/Stack?

GHC can be used as a linter for the Neovim plugin ale . GHC可用作Neovim插件ale的短绒。 The configuration uses the following command to lint a file: 配置使用以下命令来整理文件:

stack ghc -- -fno-code -v0 %t

where %t is the file in question. 其中%t是有问题的文件。 This is fast and pretty great, however, it doesn't recognize any of the options specified in the Cabal file, and it fails to run if there are internal modules referenced in the file. 这是快速且相当不错的,但是,它无法识别Cabal文件中指定的任何选项,并且如果文件中引用了内部模块,则它无法运行。

Is it possible somehow to get the GHC command that would be issued by cabal build or stack build , so that we can get the extensions/references/etc necessary to get this working? 是否有可能以某种方式获取由cabal buildstack build发出的GHC命令,以便我们可以获得进行此工作所需的扩展名/引用/ etc?

启用冗长功能会为您提供所需的信息:

stack build --verbose --cabal-verbose

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

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