首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在Haskell中添加依赖项并使其对Intero可见

如何在Haskell中添加依赖项并使其对Intero可见
EN

Stack Overflow用户
提问于 2018-06-19 04:00:25
回答 1查看 334关注 0票数 2

我想在带有Haskell模式和Intero的emacs中使用System.Directory,而实时检查则警告Couldn't find module System.Directory。因此,我在我的阴谋文件中添加了一些依赖项。当stack build成功执行时,警告不会消失。

下面是我的阴谋卷宗:

代码语言:javascript
复制
-- 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.DirectoryIntero可见,这样警告就可以消失。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-06-19 12:57:49

您可以通过运行intero-restart来让它显示出来。

也许有一种“更正确”的方法,但这是可行的。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50920456

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档