On 02/01/2014, at 1:24 PM, srean wrote: > > A:> So could you add some info there, given that it is such a key feature of > Felix in widespread use. I dont know enough of what Felix can and cannot > pattern match on. So its beyond my ability to document it.
Any literal of a type with an equality operator. You cannot match on expressions directly, so this is NOT allowed: var y = 42; match x with | y => ... you have to do this instead: match x with | ?v when v == y => ... but there's a shorthand for that: match x with | $(v) => ... More generally, matching "match" type constructors. Literals are a special kind of type constructor with no arguments, or, if you prefer with themselves as the argument of a type specific constructor. -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language