Quoting skaller <[EMAIL PROTECTED]>: > On Thu, 2007-07-19 at 10:08 +0200, [EMAIL PROTECTED] wrote: > >> Maybe you can try to delete the rules of Felix that are causing the >> ambiguity when csyntax is opened. > > I'm not sure how to delete a rule. The function to delete
You just have to use dyp.remove_rule <- [your_rule]; It is like adding a rule except you don't have to bother with a user action. > rules is more or less useless, because it requires you > keep an exact copy of the rule. Why ? > > Felix doesn't create rules that way because it is effectively > impossible to get the type right. Type inference fails > due to recursion and polymorphic variants. This is normally > fixed by a full coercion, however that requires knowing > the full type name. I have no idea what the type should be. > I gave up on keeping 'compiled' rules. > > The rules are bad .. they are applied to 'dyp' toolbox thing, > but they also *contain* a dyp toolbox thing .. circular type. > The variant type breaks the circularity .. but ONLY if you can > make a closed type, which includes the full type of the > toolbox also depending on the variant containing itself ... > APPLYing the rule like > > dyp.add_rules <- rule .. > > > closes the recursion, but > > let r = rule in > > doesn't... Hope this waffle makes sense :) You don't have to bother with dypgen_toolbox when deleting a rule because the type of an action doesn't depend on it. (The type of user actions does but when you delete a rule you don't consider its user action.) The type of a rule is not recursive and has no functionnal part. > > Felix just keeps the rules 'as written' by the user, > and translates them when required. > > The point is you can't delete the translated rule because > it is physically a different Ocaml term. It should only need to be structurally equal to the existing rule you want to delete, not physically. Otherwise it's a bug in dypgen. Emmanuel ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language