diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2014-09-26 10:53:32 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2014-09-26 12:34:51 +0100 |
commit | 1a88f9a4fb373ce52284996212fc23b06848b1c0 (patch) | |
tree | f47edfba08918411312ea1825d5392d3cde43caf /testsuite/tests/typecheck/should_compile/FD3.stderr | |
parent | 8c9d0ce490506fdc60d9f25d4b80774180cf92ce (diff) | |
download | haskell-1a88f9a4fb373ce52284996212fc23b06848b1c0.tar.gz |
Improve error messages from functional dependencies
Reponding to Trac #9612:
* Track the CtOrigin of a Derived equality, arising from a
functional dependency
* And report it clearly in the error stream
This relies on a previous commit, in which I stop dropping Derived
insolubles on the floor.
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/FD3.stderr')
-rw-r--r-- | testsuite/tests/typecheck/should_compile/FD3.stderr | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/testsuite/tests/typecheck/should_compile/FD3.stderr b/testsuite/tests/typecheck/should_compile/FD3.stderr index d2364921f6..0ba6587273 100644 --- a/testsuite/tests/typecheck/should_compile/FD3.stderr +++ b/testsuite/tests/typecheck/should_compile/FD3.stderr @@ -1,5 +1,14 @@ -
-FD3.hs:15:15:
- No instance for (MkA (String, a) a) arising from a use of ‘mkA’
- In the expression: mkA a
- In an equation for ‘translate’: translate a = mkA a
+ +FD3.hs:15:15: + Couldn't match type ‘a’ with ‘(String, a)’ + ‘a’ is a rigid type variable bound by + the type signature for translate :: (String, a) -> A a + at FD3.hs:14:14 + arising from a functional dependency between: + constraint ‘MkA (String, a) a’ arising from a use of ‘mkA’ + instance ‘MkA a1 a1’ at FD3.hs:12:10-16 + Relevant bindings include + a :: (String, a) (bound at FD3.hs:15:11) + translate :: (String, a) -> A a (bound at FD3.hs:15:1) + In the expression: mkA a + In an equation for ‘translate’: translate a = mkA a |