Leo White

Results 191 comments of Leo White

Personally, I dislike both the: ```ocaml module functor E = F ``` form and mechanisms based on a name for the contents of the current module, and would prefer to...

That is one way to look at it and it does look different from other uses of module types in that perspective. An alternative though is to consider `include S`...

> we enforce correctness in structures by unifying quux with the type of Bar.baz, but only enforce correctness in signatures via the inclusion check I think this might cause some...

I agree that having `bar` update `foo`'s type is weird. I think that `external` declarations without aliases should definitely be treated as rigid. I think that supporting things like: ```ocaml...

> I wonder if we can't use Ctype.mcomp to at least have it error if there is no way the types could be made equal. In fact this should be...

> I'm uneasy about the permissiveness of checking for aliases in signatures. Delaying checking until signature inclusion means allowing obviously incorrect declarations, e.g. > ```ocaml > module type S =...

> Most OCaml programs are as fast or faster with OCaml 5 FWIW this does not match our experience with OCaml 5 at Jane Street. Most programs are measurably slower...

> I wouldn't expect a noticeable performance cost coming from this, type definitions are small and variance computation is fast. Module types in the results of functors can be huge....

(I think Jacques suggested approach is probably fine for this -- as he says you need to not break the laziness of the application -- I just wanted to push...

> It is surprising because type definitions accept non-regular definitions just fine Not for equirecursive types. Here are the underlying type definitions for your example: ```ocaml type ('a, 'b) tree_visitor...