Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: [Caml-list] Can we have more flexible destructive type substitution?

14 views
Skip to first unread message

Jacques Garrigue

unread,
Jul 24, 2015, 10:37:38 AM7/24/15
to Ben Millwood, OCaML List Mailing
On 2015/07/24 23:25, Ben Millwood wrote:
>
> Currently, for [sig ... end with type lhs := rhs] to be valid, rhs needs to be an application of a type constructor to the same type parameters as lhs.
>
> I'd like to do, at a minimum, [sig ... end with type 'a t := 'a], but this is currently forbidden. Are there conceptual obstacles to permitting arbitrary type expressions on the RHS, or are they simply not implemented yet?

I think there is no problem in theory.
The reason it is not allowed currently is that substitution relies on the path substitution code, which allows only replacing a path by another path.
Would have to think about how much new code this would require to implement. It might not be that much in practice.

Jacques Garrigue


--
Caml-list mailing list. Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs
0 new messages