diff options
author | David Kraeutmann <kane@kane.cx> | 2015-07-07 16:59:52 +0200 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-07-07 16:59:52 +0200 |
commit | 9a3e1657db4c0292fc06d6183a802af631c3666a (patch) | |
tree | f18d0fb8619e580a69ce99c4c107bd9b43450180 /docs | |
parent | 31580e2c81543a58c0d352154c6109d843978cdf (diff) | |
download | haskell-9a3e1657db4c0292fc06d6183a802af631c3666a.tar.gz |
Deferred type errors now throw TypeError (#10284)
Depends on D864.
Previous behaviour was ErrorCall, which might mask issues in tests
using -fdefer-type-errors
Signed-off-by: David Kraeutmann <kane@kane.cx>
Test Plan: Test whether the error thrown is indeed TypeError and not
ErrorCall.
Reviewers: hvr, nomeata, austin
Reviewed By: nomeata, austin
Subscribers: nomeata, simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D866
GHC Trac Issues: #10284
Diffstat (limited to 'docs')
-rw-r--r-- | docs/users_guide/glasgow_exts.xml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml index 95f814f0d0..6d69c75faf 100644 --- a/docs/users_guide/glasgow_exts.xml +++ b/docs/users_guide/glasgow_exts.xml @@ -9196,11 +9196,11 @@ main = print "b" </para> <para> At runtime, whenever a term containing a type error would need to be - evaluated, the error is converted into a runtime exception. - Note that type errors are deferred as much as possible during runtime, but - invalid coercions are never performed, even when they would ultimately - result in a value of the correct type. For example, given the following - code: + evaluated, the error is converted into a runtime exception of type + <literal>TypeError</literal>. Note that type errors are deferred as much + as possible during runtime, but invalid coercions are never performed, + even when they would ultimately result in a value of the correct type. + For example, given the following code: <programlisting> x :: Int x = 0 @@ -9211,7 +9211,7 @@ y = x z :: Int z = y </programlisting> - evaluating <literal>z</literal> will result in a runtime type error. + evaluating <literal>z</literal> will result in a runtime <literal>TypeError</literal>. </para> </sect2> <sect2><title>Deferred type errors in GHCi</title> |