haskell / haskell/haskell-mode

:set +c makes all warnings appear twice, breaking some functionality

Open
#1,505 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Emacs Lisp
Stars
1.4k
Forks
354
Avg merge
5d 10h
Merged PRs (30d)
2

Description

I'm not sure why nobody noticed this, but for me, the `:set +c` has the bad side-effect of producing this:

```
<- [-Wunused-imports]
The import of ‘Data.Typeable’ is redundant
except perhaps to import instances from ‘Data.Typeable’
To import instances alone, use: import Data.Typeable()
Ok, modules loaded: Variable.
Collecting type info for 1 module(s) ...

/home/ptival/chick/lib/Term/Variable.hs:18:1-20: warning: [-Wunused-imports]
The import of ‘Data.Typeable’ is redundant
except perhaps to import instances from ‘Data.Typeable’
To import instances alone, use: import Data.Typeable()
```

That is, it seems warnings are emitted once when type-checking, then once more when colllecting type information.

This has the bad side effect that features like "removing redundant imports" ask me to remove each import twice!

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with `:set +c` in a Haskell buffer and trace warning output during type-checking and type-information collection. Identify why the same warning is emitted twice; done means each warning appears once and redundant-import actions do not require removing an import twice.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs, 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.