On Sun, 2006-09-03 at 19:37 -0400, Peter Tanski wrote:

> > so the only difference is that in my form an explicit pattern
> > is parsed and used to identify the variables, and the shape
> > of this pattern acts as a limitation: Jay removes that limitation.

And btw I have just rewritten code so that the type encoding
now allows for 'match varibles' within types, which eliminates
the need to duplicate the type encoding inside the type
pattern encoding. This makes the 'typematch' as general
as the pattern calculus with some futz which reduces the
general types to one with the 'variable tag' removed.
[Felix uses ?x to denote a variable in patterns, which
is a bit ugly]

An interesting (and purely syntactic!) quandary:
Here:

        1 + int * list as list

the 'as' form is a fixpoint binder denoting recursion.
But here:

        match xx with | (_ * ?y) as z =>

the 'as' is an assignment naming a type, i.e. a typedef
inside a pattern. These things are correlated, and they can
be distinguished by whether there is an inner occurence
of the introduced variable.. but this is not really 
desirable, to have two meanings of 'as' .. but I can't
think of any other solution. Well you could use

        fix[list] 1 + int * list

for the fixpoint .. but I actually find the Ocaml 'as'
quite readable (although the precedence is obscure).

So great the obstacle, in the new code 'as' means
'pattern as' when used in a pattern position, which
means such encoding cannot support anonymous
recursive types. Any suggestions?


-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language

Reply via email to