skaller wrote: > So here we go: read page 6 of the pattern calculus paper. > There is a nasty definition there of matchable forms. > As far as I can tell, here is how I read this definition: \gamma is a set of constructors \theta is a set of matching variables (and I believe they have to be disjoint).
If you can divide symbols in a match into \gamma, \theta and then proceed to do a match, all is fine. Otherwise, fail. > This works as expected. But: > > --------------------------------------------- > // THIS DOES NOT WORK because unconstrained > // pattern matching is NOT confluent > > typedef fun ite(b:TYPE, s:TYPE, r:TYPE): TYPE => > typecase [] True => > typecase [x] x => s endcase > endcase > b r > ; > The issue here is that if b is a "free variable" (representing a TYPE), then you don't know what b might be specialized to. It might be a constructor, it might be 'x' (or contain it), it might be lots of things, all of which will cause things to go wrong. So your ite function should not evaluate until it has actual parameters [if I understood your explanation correctly]. Jacques ------------------------------------------------------------------------- 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
