diff options
author | Matthías Páll Gissurarson <mpg@mpg.is> | 2018-01-26 13:07:36 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-01-26 14:37:28 -0500 |
commit | cbdea95938bf09e8e3e7be31918549224d171873 (patch) | |
tree | bb5f9571a118e57edc580dc33c686c5d44f41c4a /testsuite/tests/rts/T1791 | |
parent | 31c260f3967d2c06063c962a98475058daa45c6d (diff) | |
download | haskell-cbdea95938bf09e8e3e7be31918549224d171873.tar.gz |
Sort valid substitutions for typed holes by "relevance"
This is an initial attempt at tackling the issue of how to order the
suggestions provided by the valid substitutions checker, by sorting
them by creating a graph of how they subsume each other. We'd like to
order them in such a manner that the most "relevant" suggestions are
displayed first, so that the suggestion that the user might be looking
for is displayed before more far-fetched suggestions (and thus also
displayed when they'd otherwise be cut-off by the
`-fmax-valid-substitutions` limit). The previous ordering was based on
the order in which the elements appear in the list of imports, which I
believe is less correlated with relevance than this ordering.
A drawback of this approach is that, since we now want to sort the
elements, we can no longer "bail out early" when we've hit the
`-fmax-valid-substitutions` limit.
Reviewers: bgamari, dfeuer
Reviewed By: dfeuer
Subscribers: dfeuer, rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4326
Diffstat (limited to 'testsuite/tests/rts/T1791')
0 files changed, 0 insertions, 0 deletions