我对 Haskell 这种语言有些熟悉,但对工具链不太熟悉。(在 cabal 和 stack 存在之前,我曾使用 Haskell。)有人告诉我,stack 是我应该用来管理 Haskell 项目的工具。我正在尝试学习 haste 库,但我在尝试的第一个教程中遇到了困难,因为我无法安装 hplayground。我创建了一个堆栈项目;我的 stack.yaml 有
extra-deps:
- ghc-simple-0.3
- haste-compiler-0.5.3
- shellmate-0.2.3
- haste-perch-0.1.0.9
- hplayground-0.1.3.1
我的 .cabal 文件在 build-depends 中列出了 hplayground。但是当我运行 stack build 时,我得到了这些错误:
Configuring haste-perch-0.1.0.9...
Building haste-perch-0.1.0.9...
Preprocessing library haste-perch-0.1.0.9...
Haste/Perch.hs:17:15: Warning:
-XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
Haste/App/Perch.hs:18:15: Warning:
-XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
[1 of 2] Compiling Haste.App.Perch ( Haste/App/Perch.hs, .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/build/Haste/App/Perch.o )
Haste/App/Perch.hs:61:15: Not in scope: ‘newTextElem’
Haste/App/Perch.hs:71:9:
Not in scope: ‘setAttr’
Perhaps you meant ‘jsSetAttr’ (imported from Haste.App)
Haste/App/Perch.hs:76:15:
Not in scope: ‘newElem’
Perhaps you meant one of these:
‘nelem’ (line 75), ‘notElem’ (imported from Prelude)
以及很多类似的错误。对我做错了什么有任何想法吗?
更广泛地说:对于没有使用 Haskell 工具链的人来说,有什么快速、简单的方法可以快速启动和运行?