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
タイプr
代用しようとしているときに、私はこのエラーを取得しています:OCamlの破壊的な置換誤り
Error: Only type constructors with identical parameters can be substituted.
をしかし、これは動作します:
module type MAIN_COMPONENT =
sig
type t
type event
type r
type r' = (t * event task option, r) loop
include COMPONENT
with type t := t
with type event := event
with type r := r'
end
なぜ?
r'
タイプを削除するにはどうすればよいですか?