小编jul*_*o65的帖子

Ocaml破坏性替换错误

type ('a, 'r) loop
type 'e task
type ('a, 'e) tmpl'

module type COMPONENT =
sig
    type t
    type event
    type r

    val update : t -> event -> r
    val view : (t, event) tmpl'
end

module type MAIN_COMPONENT =
sig
    type t
    type event
    type r

    include COMPONENT
        with type t := t
        with type event := event
        with type r := (t * event task option, r) loop
end
Run Code Online (Sandbox Code Playgroud)

我在尝试替换类型时遇到此错误r:

Error: Only type constructors with …

ocaml module

3
推荐指数
1
解决办法
246
查看次数

标签 统计

module ×1

ocaml ×1