誰か教えて module typing
次のコードがなぜエラーになるのかよくわからない。
module type RESULT = sig type result val v : result list end module Make (P : sig type t end) : RESULT (* with type result = P.t *) = struct type result = P.t let v : result list = [] end module A = struct module B = struct type t end module C = Make(B) end module A' = A let _ = A.C.v = A'.C.v
コメントを外すと通るので、functor application の結果、同じだった型が別の物と認識されるのだろう、という予想を立てた。でも、それでも、、、
module B = struct type t end module A = struct module C = Make(B) end
コメントはそのままで、module B を module A の定義から外すと通る事の説明にはならない。というか、これで通って上が通らない理由が判らん。誰か教えてくれませんか。
つうか単にバグ?