lspitzner / lspitzner/brittany

Support for `ImportQualifiedPost` GHC extension

Open
#369 1 comment 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement language extension support
Dominant language
Haskell
Stars
686
Forks
69
PR merge metrics
No merged PRs in 30d

Description

(**This is a feature request**)

GHC 8.10.1 introduced a new extension called [ImportQualifiedPost](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/import_qualified_post.html).
Basically what it allows is the following syntax:
```Haskell
import A qualified
import B qualified as C
```

Since the extension is included in the upcoming Haskell standard after `Haskell2010`, namely [GHC2021](https://ghc.gitlab.haskell.org/ghc/doc/users_guide/exts/control.html?highlight=ghc2021#extension-GHC2021), I think it would be nice for `brittany` to have an option to use the new syntax. Any thoughts?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the linked GHC documentation for ImportQualifiedPost and reviewing brittany's existing handling of GHC extensions and qualified imports. Identify the formatter entry points and tests for import syntax; done means both shown forms are accepted and formatted correctly, with an option for the new syntax.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
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.