我想在带有Haskell模式和Intero的emacs中使用System.Directory,而实时检查则警告Couldn't find module System.Directory。因此,我在我的阴谋文件中添加了一些依赖项。当stack build成功执行时,警告不会消失。
下面是我的阴谋卷宗:
-- This file has been generated from package.yaml by hpack version 0.28.2.
--
-- see: https://github.com/sol/hpack
--
-- hash: 536b5f6ecaaec7d4b7a9694c8f69bbe648a1d21d80fa721e533ac5b139955401
name: find
version: 0.1.0.0
description: Please see the README on GitHub at <https://github.com/Handora/find#readme>
homepage: https://github.com/Handora/find#readme
bug-reports: https://github.com/Handora/find/issues
author: Handora
maintainer: qcdsr970209@gmail.com
copyright: Qian Chen
license: BSD3
license-file: LICENSE
build-type: Simple
cabal-version: >= 1.10
extra-source-files:
ChangeLog.md
README.md
source-repository head
type: git
location: https://github.com/Handora/find
library
exposed-modules:
Lib
RecursiveContents
other-modules:
Paths_find
hs-source-dirs:
src
build-depends:
base >=4.7 && <5
, directory
default-language: Haskell2010
executable find-exe
main-is: Main.hs
other-modules:
Paths_find
hs-source-dirs:
app
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
base >=4.7 && <5
, find
, directory
default-language: Haskell2010
test-suite find-test
type: exitcode-stdio-1.0
main-is: Spec.hs
other-modules:
Paths_find
hs-source-dirs:
test
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
base >=4.7 && <5
, find
default-language: Haskell2010我将directory添加到构建依赖项和可执行的构建依赖项中。因此,我的问题是如何使System.Directory对Intero可见,这样警告就可以消失。
发布于 2018-06-19 12:57:49
您可以通过运行intero-restart来让它显示出来。
也许有一种“更正确”的方法,但这是可行的。
https://stackoverflow.com/questions/50920456
复制相似问题