Re: [open-axiom-devel] case pattern matching

2008-12-09 Thread Francois Maltey
Hi Gabriel, > As an illustration, take the package ToolsForSign. It contains the > following definition for `sign'. > > if R has RetractableTo Fraction Integer then > sign r == > (u := retractIfCan(r)@Union(Fraction Integer, "failed")) > case Fraction(Integer) => sign(u

[open-axiom-devel] case pattern matching

2008-12-08 Thread Gabriel Dos Reis
Hi, This morning I applied a patch to OpenAxiom (trunk) that supports pattern matching with retractable domains. I showed an example with the Syntax domain. I was asked whether there other places where the extension is relevant. The answer is emphatically yes. Virtually all the places whe