avh4 / avh4/elm-format

Add workaround for qualified record extension

Open
#353 3 comments 1 reaction 0 assignees View on GitHub
discussion
Dominant language
Haskell
Stars
1.3k
Forks
148
PR merge metrics
No merged PRs in 30d

Description

This code does not parse in elm-compiler:

```elm
{ SomeModule.base | x = 1 }
```

elm-format could detect code like that and replace it with:

```elm
let
base = SomeModule.base
in
{ base | x = 1 }
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating elm-format's handling of record extension expressions and how it represents qualified expressions. Reproduce the elm-compiler parse failure with `{ SomeModule.base | x = 1 }`, then verify that the formatter produces the shown let-binding workaround while preserving the resulting record update.

Written by the indexing model from the issue text.

Assessment

Tech stack
elm
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.