Hi Ziv, Thanks for your comprehensive answer!
Sincerely, Saulo On Fri, Sep 30, 2016 at 10:17 PM, Ziv Scully <[email protected]> wrote: > The relevant mechanism is `where`. Try something like the following. > > signature A = sig type t end > signature B = sig type t end > > structure C = sig > structure A1 : A > structure B1 : B where type t = A.t > end > > This is especially useful for relating types in the input and output > signatures of functors: > > functor F(A1 : A) : B where type t = A.t > > You can do the same for any constructor using `where con` instead of > `where type`, and you can use multiple `where` statements on the same > signature one after the other. > > > On Fri, Sep 30, 2016 at 8:35 PM, Saulo Araujo <[email protected]> wrote: > >> Hi, >> >> Does Ur/Web supports sharing types in signatures like in the code below? >> >> signature A = sig >> type t >> end >> >> signature B = sig >> type t >> end >> >> signature C = sig >> structure A1 : A >> structure B1 : B >> sharing type A1.t = B1.t >> end >> >> In case it is not supported, is there a way to accomplish something >> similar? >> >> Sincerely, >> Saulo >> >> _______________________________________________ >> Ur mailing list >> [email protected] >> http://www.impredicative.com/cgi-bin/mailman/listinfo/ur >> >> > > _______________________________________________ > Ur mailing list > [email protected] > http://www.impredicative.com/cgi-bin/mailman/listinfo/ur > >
_______________________________________________ Ur mailing list [email protected] http://www.impredicative.com/cgi-bin/mailman/listinfo/ur
