在编译时ghcjs期间在haskell中包含模块

时间:2017-05-11 12:51:20

标签: haskell ghcjs

我想将一个haskell代码编译为javascript,并在编译期间出现以下错误。

> ghcjs Main.hs 

Main.hs:2:8:
    Could not find module ‘Reflex.Dom’
    Use -v to see a list of the files searched for.

Main.hs:4:8:
    Could not find module ‘Data.Matrix’
    Perhaps you meant Data.Ratio (from base-4.8.0.0)
    Use -v to see a list of the files searched for.

我没有使用堆栈,我想知道在编译期间我应该如何提供库?

1 个答案:

答案 0 :(得分:0)

使用Cabal管理项目,在build-dep会话中编写依赖项。然后安装你的项目。