• Matthías Páll Gissurarson's avatar
    Add built-in syntax suggestions, and refactor to allow library use · 1c92f193
    Matthías Páll Gissurarson authored
    This change to the valid hole fits adds built-in syntax candidates (like (:) and []),
    so that they are checked in addition to what is in scope.
    The rest is merely a refactor and export of the functions used to find the valid
    hole fits, since there was interest at ICFP to use the valid hole fit machinery for
    additional uses. By exporting the `tcFilterHoleFits` function, this can now be done
    without having to rely on parsing the actual error message.
    Test Plan: Test for built-in syntax included
    Reviewers: bgamari
    Reviewed By: bgamari
    Subscribers: RyanGlScott, rwbarton, carter
    Differential Revision: https://phabricator.haskell.org/D5227
TcHoleErrors.hs 46.6 KB