haskell / haskell/haskell-language-server

Got to implementation for a record (field) should take me to the constructions of the record (field)

Open
#4,990 2 comments 3 reactions 0 assignees View on GitHub
Hackathon type: enhancement
Dominant language
Haskell
Stars
3k
Forks
455
Avg merge
4d 3h
Merged PRs (30d)
12

Description

## Problem

A record type definition defines an interface. Often I am looking at this interface, and want to see implementations of it.

I can already use got to references to see places that the record or record field is used either as a selector or a constructor, but I want to just see places where we are constructing this specific record or field.

More concretely, this is something I want when looking at a Servant named API.
The API is defined as a record and I often want to jump to the code that defines the handler for that API.

## Describe the solution you'd like

When I hover over a record constructor and go to implementation, then I should see all the places a record is constructed.

When I hover over a record field and go to implementation, then I should see all the places that this field is being constructed. If RecordWildCards are being used then I should see where the variable is defined rather than `..`.

## Additional context

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by examining the existing go-to-references behavior for record types and fields, using the Servant named API example as a concrete case. The work is done when go-to-implementation on a record constructor finds record constructions, and on a field finds its construction sites, including the defining variable when RecordWildCards are used.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.