haskell / haskell/haskell-mode

[bug] wrong Type name for `type` in imenu-list when RankNTypes used

Open
#1,736 0 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

#### example
`Foo.hs`
``` hs
{-# LANGUAGE RankNTypes #-}
type Foo a = forall m . Monad m => m a
```

#### wrong result
`*Ilist* Foo.hs`
```
+ Datatypes
m
```

#### it should be
`*Ilist* Foo.hs`
```
+ Datatypes
Foo
```

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue with the RankNTypes example in Foo.hs and inspect the imenu-list type-name parsing entry point. Trace why the generated Datatypes entry is m rather than Foo, then verify that the imenu-list output uses Foo for the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs-lisp
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.