diff options
author | Matthías Páll Gissurarson <mpg@mpg.is> | 2018-01-18 00:49:38 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-01-18 00:49:40 -0500 |
commit | 1e14fd3ecfd468c3beddb2e5f992c358e1a798de (patch) | |
tree | 080300ea965349584307202930ef7d1cbd8e5c1f /testsuite/tests/th/T10267.stderr | |
parent | 6b1ff0098e7595d5f3b8e6ad7c5d8e4104b02445 (diff) | |
download | haskell-1e14fd3ecfd468c3beddb2e5f992c358e1a798de.tar.gz |
Inform hole substitutions of typeclass constraints (fixes #14273).
This implements SPJ's suggestion on the ticket (#14273). We find the
relevant constraints (ones that whose free unification variables are all
mentioned in the type of the hole), and then clone the free unification
variables of the hole and the relevant constraints. We then add a
subsumption constraints and run the simplifier, and then check whether
all the constraints were solved.
Reviewers: bgamari
Reviewed By: bgamari
Subscribers: RyanGlScott, rwbarton, thomie, carter
GHC Trac Issues: #14273
Differential Revision: https://phabricator.haskell.org/D4315
Diffstat (limited to 'testsuite/tests/th/T10267.stderr')
-rw-r--r-- | testsuite/tests/th/T10267.stderr | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/testsuite/tests/th/T10267.stderr b/testsuite/tests/th/T10267.stderr index 0ac32fad1c..ca650c3eba 100644 --- a/testsuite/tests/th/T10267.stderr +++ b/testsuite/tests/th/T10267.stderr @@ -29,6 +29,8 @@ T10267.hs:8:1: error: • Relevant bindings include i :: a -> a (bound at T10267.hs:8:1) Valid substitutions include l :: forall a. a -> a (defined at T10267.hs:23:3) + i :: forall a. a -> a (defined at T10267.hs:8:1) + j :: forall a. a -> a (defined at T10267.hs:8:1) k :: forall a. a -> a (defined at T10267.hs:14:3) foo :: forall a. a -> a (defined at T10267.hs:33:1) id :: forall a. a -> a @@ -52,6 +54,9 @@ T10267.hs:14:3: error: • Relevant bindings include k :: a -> a (bound at T10267.hs:14:3) Valid substitutions include l :: forall a. a -> a (defined at T10267.hs:23:3) + i :: forall a. a -> a (defined at T10267.hs:8:1) + j :: forall a. a -> a (defined at T10267.hs:8:1) + k :: forall a. a -> a (defined at T10267.hs:14:3) foo :: forall a. a -> a (defined at T10267.hs:33:1) id :: forall a. a -> a (imported from ‘Prelude’ at T10267.hs:3:8-13 |