Current Behavior
Multi-clause functions (same name/arity with different pattern matches) are merged into a single entry in the function coder. All clauses appear in one pane. This is correct but limited.
Desired Improvements
1. Break out individual clauses
Each clause of a multi-clause function could be its own editable pane, with:
- Clause-level move up/down (reorder clauses)
- Clause-level delete
- Visual grouping showing they belong to the same function
2. Smart "New function" placement
When adding a new function via the "New function" editor, if the function name/arity matches an existing multi-clause function, the new clause should be placed adjacent to the existing clauses rather than at the end of the file. This maintains Elixir's requirement that function clauses be consecutive.
Current Fix
merge_clauses/1 in GtBridge.Analysis.all_functions/1 merges consecutive entries with the same name/arity/kind into a single entry spanning all clauses (commit in mariari/editor-session-self-import).
Current Behavior
Multi-clause functions (same name/arity with different pattern matches) are merged into a single entry in the function coder. All clauses appear in one pane. This is correct but limited.
Desired Improvements
1. Break out individual clauses
Each clause of a multi-clause function could be its own editable pane, with:
2. Smart "New function" placement
When adding a new function via the "New function" editor, if the function name/arity matches an existing multi-clause function, the new clause should be placed adjacent to the existing clauses rather than at the end of the file. This maintains Elixir's requirement that function clauses be consecutive.
Current Fix
merge_clauses/1inGtBridge.Analysis.all_functions/1merges consecutive entries with the same name/arity/kind into a single entry spanning all clauses (commit inmariari/editor-session-self-import).