avh4 / avh4/elm-format

Collapsed imports; rewrite source to not break compilation

Open
#577 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
1.3k
Forks
147
PR merge metrics
No merged PRs in 30d

Description

https://ellie-app.com/3Wd7CZC2Mkya1
```
module Main exposing (main)

import Browser
import Browser as B

x = 3
```
elm-formatted into
```
module Main exposing (main)

import Browser as B

x =
3
```
and no references to `Browser.thing` were changed into `B.thing`.

Can we translate all `Browser.thing` into `B.thing` if we collapse import statements so it doesn't break code?

Related: #379 #445

Contributor guide

No contributing guide indexed for this repository

Research direction

Use the linked Ellie reproduction as the first check, then inspect the formatter logic for collapsing imports and handling qualified references. Done means the example remains compilable after imports collapse, with references updated consistently; review the related cases in #379 and #445.

Written by the indexing model from the issue text.

Assessment

Tech stack
elm, haskell
Domain
tooling
Issue type
Bug
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.