summaryrefslogtreecommitdiff
path: root/testsuite/tests/rts/T1791
diff options
context:
space:
mode:
authorMatthías Páll Gissurarson <mpg@mpg.is>2018-01-26 13:07:36 -0500
committerBen Gamari <ben@smart-cactus.org>2018-01-26 14:37:28 -0500
commitcbdea95938bf09e8e3e7be31918549224d171873 (patch)
treebb5f9571a118e57edc580dc33c686c5d44f41c4a /testsuite/tests/rts/T1791
parent31c260f3967d2c06063c962a98475058daa45c6d (diff)
downloadhaskell-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