【发布时间】:2011-06-26 15:12:27
【问题描述】:
我想在我的 haskell 项目中使用 xml 库 (http://hackage.haskell.org/package/xml)
我下载了它。然后尝试构建和安装:
runhaskell Setup.hs configure
runhaskell Setup.hs build
runhaskell Setup.hs install
一切正常。没有错误。当我尝试从这个库导入模块到我的项目时,例如:
import Text.XML.Light.Cursor
我得到错误:
/home/shk/dev/src/XMPP.hs:8:8:
Could not find module `Text.XML.Light.Cursor':
Use -v to see a list of the files searched for.
Failed, modules loaded: none.
怎么了?如何在 haskell 中安装和使用库?
谢谢。
【问题讨论】:
-
你是如何构建你的项目的?你是用cabal,还是直接调用ghc?
-
你真的想使用 cabal 或 cabal-dev。直接调用 ghc 会导致挫败感。
标签: haskell distributed