[commit: ghc] master: Unquote ‘import’ in bad import error message (e195add)
git at git.haskell.org
git at git.haskell.org
Tue Jan 17 21:37:55 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/e195add1f203a0e169a2ea6e58be8d7989e9e0a4/ghc
>---------------------------------------------------------------
commit e195add1f203a0e169a2ea6e58be8d7989e9e0a4
Author: Phil Ruffwind <rf at rufflewind.com>
Date: Tue Jan 17 15:55:28 2017 -0500
Unquote ‘import’ in bad import error message
In module ‘Prelude’:
‘True’ is a data constructor of ‘Bool’
To import it use
‘import’ Prelude( Bool( True ) )
The quotes around `import` don't make any sense.
Test Plan: manual
Reviewers: austin, mpickering, bgamari
Reviewed By: mpickering, bgamari
Subscribers: dfeuer, thomie
Differential Revision: https://phabricator.haskell.org/D2935
>---------------------------------------------------------------
e195add1f203a0e169a2ea6e58be8d7989e9e0a4
compiler/rename/RnNames.hs | 4 ++--
testsuite/tests/module/mod90.stderr | 6 +++---
testsuite/tests/rename/should_fail/T10668.stderr | 4 ++--
testsuite/tests/rename/should_fail/T5385.stderr | 6 +++---
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/compiler/rename/RnNames.hs b/compiler/rename/RnNames.hs
index 8a7529d..9d2de74 100644
--- a/compiler/rename/RnNames.hs
+++ b/compiler/rename/RnNames.hs
@@ -1488,11 +1488,11 @@ badImportItemErrDataCon dataType_occ iface decl_spec ie
<+> text "is a data constructor of"
<+> quotes dataType
, text "To import it use"
- , nest 2 $ quotes (text "import")
+ , nest 2 $ text "import"
<+> ppr (is_mod decl_spec)
<> parens_sp (dataType <> parens_sp datacon)
, text "or"
- , nest 2 $ quotes (text "import")
+ , nest 2 $ text "import"
<+> ppr (is_mod decl_spec)
<> parens_sp (dataType <> text "(..)")
]
diff --git a/testsuite/tests/module/mod90.stderr b/testsuite/tests/module/mod90.stderr
index 9febfe3..78a0040 100644
--- a/testsuite/tests/module/mod90.stderr
+++ b/testsuite/tests/module/mod90.stderr
@@ -1,8 +1,8 @@
-mod90.hs:3:16:
+mod90.hs:3:16: error:
In module ‘Prelude’:
‘Left’ is a data constructor of ‘Either’
To import it use
- ‘import’ Prelude( Either( Left ) )
+ import Prelude( Either( Left ) )
or
- ‘import’ Prelude( Either(..) )
+ import Prelude( Either(..) )
diff --git a/testsuite/tests/rename/should_fail/T10668.stderr b/testsuite/tests/rename/should_fail/T10668.stderr
index 8c96fad..4e602b2 100644
--- a/testsuite/tests/rename/should_fail/T10668.stderr
+++ b/testsuite/tests/rename/should_fail/T10668.stderr
@@ -3,6 +3,6 @@ T10668.hs:3:27: error:
In module ‘Data.Type.Equality’:
‘Refl’ is a data constructor of ‘(:~:)’
To import it use
- ‘import’ Data.Type.Equality( (:~:)( Refl ) )
+ import Data.Type.Equality( (:~:)( Refl ) )
or
- ‘import’ Data.Type.Equality( (:~:)(..) )
+ import Data.Type.Equality( (:~:)(..) )
diff --git a/testsuite/tests/rename/should_fail/T5385.stderr b/testsuite/tests/rename/should_fail/T5385.stderr
index 677c31f..dd825c6 100644
--- a/testsuite/tests/rename/should_fail/T5385.stderr
+++ b/testsuite/tests/rename/should_fail/T5385.stderr
@@ -1,8 +1,8 @@
-T5385.hs:3:16:
+T5385.hs:3:16: error:
In module ‘T5385a’:
‘(:::)’ is a data constructor of ‘T’
To import it use
- ‘import’ T5385a( T( (:::) ) )
+ import T5385a( T( (:::) ) )
or
- ‘import’ T5385a( T(..) )
+ import T5385a( T(..) )
More information about the ghc-commits
mailing list