Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Fix source spans for multi-clause definitions #318

Merged
merged 3 commits into from
Jan 10, 2020
Merged

Fix source spans for multi-clause definitions #318

merged 3 commits into from
Jan 10, 2020

Commits on Jan 10, 2020

  1. Fix source spans for multi-clause definitions

    Currently, we use the source span of the match which corresponds to
    the whole clause instead of just the function identifier. This
    resulted in us pointing every goto definition request within a clause
    to the function if there is no other information (either because it
    failed because it came from an external package or simply because you
    are not on an identifier).
    
    This PR fixes this by getting the proper source spans frmo the
    HsMatchContext. Somewhat annoyingly, we have to get it from the parsed
    module since GHC messes this up during typechecking but it’s
    reasonably simple.
    cocreature committed Jan 10, 2020
    Configuration menu
    Copy the full SHA
    c2ef37c View commit details
    Browse the repository at this point in the history
  2. fix ancient GHC

    cocreature committed Jan 10, 2020
    Configuration menu
    Copy the full SHA
    893366d View commit details
    Browse the repository at this point in the history
  3. fix comment

    cocreature committed Jan 10, 2020
    Configuration menu
    Copy the full SHA
    8fa0132 View commit details
    Browse the repository at this point in the history