Skip to content

Function to adjust the name of a Rule, GRuleDef, GRuleCall and Named Group #111

@aniketd

Description

@aniketd

With the ability to rename an existing definition one would not need to redefine an entire rule, just to use it with a different name.

For examples:

aSimpleRule :: Rule
aSimpleRule = "a_simple_rule" =:= VUInt

...could be reused in another file as

aSimpleRuleRenamed :: Rule
aSimpleRuleRenamed = aSimpleRule `renamedAs` $ \n -> n <> "_with_a_new_suffix"

This can probably be achieved by a combination of {get|set}Field.

Metadata

Metadata

Assignees

No one assigned

    Labels

    HuddleIssues relating to the Huddle languageenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions