Re: [merd-devel] polymorphic functional update
Status: Pre-Alpha
Brought to you by:
pixel_
From: Yoann P. <Yoa...@ir...> - 2002-09-30 17:05:47
|
Yoann Padioleau <Yoa...@ir...> writes: > Pixel <pi...@ma...> writes: > > > 1 rien compris > 2 t'as une type sur http://merd.net/types.html > la syntax pour subtype et supertype est la meme euh c typo que je voulais dire :) 2 t'as une typo sur http://merd.net/types.html > > > > I just finished Types and Programming Languages from > > http://www.cis.upenn.edu/~bcpierce/tapl/. > > > > The last chapter is quite interesting. B.Pierce did include an > > invariant tag in its records. I asked him why and he told me it was > > needed to have the rule working: in the book > > > > R subtype of { x : int } > > > > doesn't type *syntactically* imply to R is of { x : int ; ... }. > > otherwise the rule could be simpler. Anyway, i've added > > http://merd.net/types.html merd version of the examples. > > Here is a typical polymorphic functional update: > > > > translate(, n) := X(x) |&| p -> X(x+n) |&| p > > > > (non sugared! some sugar may come) > > > > the ocaml version would be > > > > method translate n = {< x = x + n >} > > > > > > PS: some more about this in another mail > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by:ThinkGeek > > Welcome to geek heaven. > > http://thinkgeek.com/sf > > _______________________________________________ > > Merd-devel mailing list > > Mer...@li... > > https://lists.sourceforge.net/lists/listinfo/merd-devel > > -- Yoann Padioleau, INSA de Rennes, France, Opinions expressed here are only mine. Je n'écris qu'à titre personnel. **____ Get Free. Be Smart. Simply use Linux and Free Software. ____** |