作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使用Jane Street的Core标准库和Reason语言前端进行编程。
因此,我采取了corebuild
脚本,并通过将recorebuild
替换为ocamlbuild
,将副本另存为rebuild
。但是我在一些简单的代码上遇到了麻烦。
这是失败的最小示例:
type t = Foo int | Bar;
let foobar f => switch f {
| Foo x => x
| Bar => 0
};
corebuild
添加的众多选项之一:
rebuild -tag "ppx(ppx-jane -as-ppx)" test.byte
File "", line 0:
Attribute `explicit_arity' was not used
Command exited with code 2.
最佳答案
explicit_arity
是refmt
发出的属性,用于解决OCaml语法中与变体有关的歧义。不幸的是,它与Jane St ppx冲突,但是如果您从-tag "ppx(ppx-jane -as-ppx)"
脚本中删除corebuild
,它应该可以工作。
(注意:此信息取自Reason Discord,我个人对此没有任何经验)
关于compiler-errors - 未使用属性 'explicit_arity',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46332678/
我正在尝试使用Jane Street的Core标准库和Reason语言前端进行编程。 因此,我采取了corebuild脚本,并通过将recorebuild替换为ocamlbuild,将副本另存为reb
我是一名优秀的程序员,十分优秀!