作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我对 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
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)
最佳答案
Haste 的事件 API 在 0.4 和 0.5 系列之间进行了大修,而 HPlayground 仍然在 0.4 上。如果你想使用它,不幸的是你不得不回退到 0.4,直到 HPlayground 被修补为 0.5。
一般来说,您应该安装 pre-build binaries如果您在非 Linux 平台上(如果您也在 Linux 平台上,因为您可以获得手册页和其他细节);构建过程可能很棘手并且容易出错。
完成后,您可以引用 docs and resources haste-lang.org 上的页面,其中包含指向 API 文档、视频教程、源代码示例等的链接。
关于haskell - 如何在堆栈中使用 haste/hplayground,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36109550/
我对 Haskell 这种语言有些熟悉,但对工具链不太熟悉。 (在 cabal 和 stack 存在之前,我曾使用 Haskell。)有人告诉我,stack 是我应该用来管理 Haskell 项目的工
我是一名优秀的程序员,十分优秀!