[commit: ghc] master: Add built-in syntax suggestions, and refactor to allow library use (1c92f19)

git at git.haskell.org git at git.haskell.org
Fri Nov 2 00:34:26 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/1c92f193ee406545daedd06e0b9d5d7354d9af64/ghc

>---------------------------------------------------------------

commit 1c92f193ee406545daedd06e0b9d5d7354d9af64
Author: Matthías Páll Gissurarson <pallm at chalmers.se>
Date:   Thu Nov 1 18:32:32 2018 -0400

    Add built-in syntax suggestions, and refactor to allow library use
    
    Summary:
    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


>---------------------------------------------------------------

1c92f193ee406545daedd06e0b9d5d7354d9af64
 compiler/typecheck/TcHoleErrors.hs                 | 434 ++++++++++++---------
 .../tests/typecheck/should_compile/T14273.stderr   |   5 +-
 .../abstract_refinement_hole_fits.stderr           |  36 +-
 .../should_compile/constraint_hole_fits.stderr     |   2 +-
 .../should_compile/hole_constraints.stderr         |   2 +
 .../tests/typecheck/should_compile/holes.stderr    |  14 +-
 .../tests/typecheck/should_compile/holes2.stderr   |   3 +-
 .../tests/typecheck/should_compile/holes3.stderr   |  14 +-
 .../should_compile/refinement_hole_fits.stderr     |   4 +-
 .../should_compile/type_in_type_hole_fits.stderr   |  30 +-
 .../typecheck/should_compile/valid_hole_fits.hs    |   4 +
 .../should_compile/valid_hole_fits.stderr          |  37 +-
 12 files changed, 341 insertions(+), 244 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 1c92f193ee406545daedd06e0b9d5d7354d9af64


More information about the ghc-commits mailing list