summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchessai <chessai1996@gmail.com>2018-12-19 19:16:49 +0100
committerKrzysztof Gogolewski <krz.gogolewski@gmail.com>2018-12-19 20:57:06 +0100
commitde50f8fd432f88d26a08b07c7bf08c5bff25472e (patch)
treeab7df5885728e2336795fecf90db671dc90c4a9e
parent68d6a71646de52096ebc196320332a2d98daeb47 (diff)
downloadhaskell-de50f8fd432f88d26a08b07c7bf08c5bff25472e.tar.gz
don't suggest Rank2Types in error messages (Fixed #16000)
Summary: Rank2Types is deprecated. Don't suggest to users to use it. Reviewers: bgamari, RyanGlScott, simonpj Reviewed By: RyanGlScott, simonpj Subscribers: RyanGlScott, rwbarton, carter GHC Trac Issues: #16000 Differential Revision: https://phabricator.haskell.org/D5447
-rw-r--r--compiler/typecheck/TcValidity.hs4
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T12083a.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T12083b.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T2538.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/T5957.stderr2
-rw-r--r--testsuite/tests/typecheck/should_fail/tcfail184.stderr2
7 files changed, 8 insertions, 8 deletions
diff --git a/compiler/typecheck/TcValidity.hs b/compiler/typecheck/TcValidity.hs
index ca5db45608..867e202218 100644
--- a/compiler/typecheck/TcValidity.hs
+++ b/compiler/typecheck/TcValidity.hs
@@ -427,7 +427,7 @@ data Rank = ArbitraryRank -- Any rank ok
rankZeroMonoType, tyConArgMonoType, synArgMonoType, constraintMonoType :: Rank
-rankZeroMonoType = MonoType (text "Perhaps you intended to use RankNTypes or Rank2Types")
+rankZeroMonoType = MonoType (text "Perhaps you intended to use RankNTypes")
tyConArgMonoType = MonoType (text "GHC doesn't yet support impredicative polymorphism")
synArgMonoType = MonoType (text "Perhaps you intended to use LiberalTypeSynonyms")
constraintMonoType = MonoType (vcat [ text "A constraint must be a monotype"
@@ -618,7 +618,7 @@ forAllTyErr env rank ty
herald | null tvs = text "Illegal qualified type:"
| otherwise = text "Illegal polymorphic type:"
suggestion = case rank of
- LimitedRank {} -> text "Perhaps you intended to use RankNTypes or Rank2Types"
+ LimitedRank {} -> text "Perhaps you intended to use RankNTypes"
MonoType d -> d
_ -> Outputable.empty -- Polytype is always illegal
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr
index 13a0dff9e3..55d0358bfc 100644
--- a/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail15.stderr
@@ -1,5 +1,5 @@
SimpleFail15.hs:5:8: error:
• Illegal qualified type: (a ~ b) => t
- Perhaps you intended to use RankNTypes or Rank2Types
+ Perhaps you intended to use RankNTypes
• In the type signature: foo :: (a, b) -> (a ~ b => t) -> (a, b)
diff --git a/testsuite/tests/typecheck/should_fail/T12083a.stderr b/testsuite/tests/typecheck/should_fail/T12083a.stderr
index 910d4c35e4..fe126f9f0b 100644
--- a/testsuite/tests/typecheck/should_fail/T12083a.stderr
+++ b/testsuite/tests/typecheck/should_fail/T12083a.stderr
@@ -1,7 +1,7 @@
T12083a.hs:5:1: error:
• Illegal qualified type: Num a => a
- Perhaps you intended to use RankNTypes or Rank2Types
+ Perhaps you intended to use RankNTypes
• In the type synonym declaration for ‘Constrd’
T12083a.hs:9:26: error:
diff --git a/testsuite/tests/typecheck/should_fail/T12083b.stderr b/testsuite/tests/typecheck/should_fail/T12083b.stderr
index ae9d48754c..87649ec4c3 100644
--- a/testsuite/tests/typecheck/should_fail/T12083b.stderr
+++ b/testsuite/tests/typecheck/should_fail/T12083b.stderr
@@ -1,7 +1,7 @@
T12083b.hs:6:5: error:
• Illegal qualified type: Eq a => r
- Perhaps you intended to use RankNTypes or Rank2Types
+ Perhaps you intended to use RankNTypes
• When checking the class method:
test :: forall a r. Class a => a -> (Eq a => r) -> r
In the class declaration for ‘Class’
diff --git a/testsuite/tests/typecheck/should_fail/T2538.stderr b/testsuite/tests/typecheck/should_fail/T2538.stderr
index dc87c5d9c9..18c82bd992 100644
--- a/testsuite/tests/typecheck/should_fail/T2538.stderr
+++ b/testsuite/tests/typecheck/should_fail/T2538.stderr
@@ -1,7 +1,7 @@
T2538.hs:6:6: error:
• Illegal qualified type: Eq a => a -> a
- Perhaps you intended to use RankNTypes or Rank2Types
+ Perhaps you intended to use RankNTypes
• In the type signature:
f :: (Eq a => a -> a) -> Int
diff --git a/testsuite/tests/typecheck/should_fail/T5957.stderr b/testsuite/tests/typecheck/should_fail/T5957.stderr
index 8239d56de9..66bc0c1d0d 100644
--- a/testsuite/tests/typecheck/should_fail/T5957.stderr
+++ b/testsuite/tests/typecheck/should_fail/T5957.stderr
@@ -1,6 +1,6 @@
T5957.hs:3:9: error:
• Illegal qualified type: Show a => a -> String
- Perhaps you intended to use RankNTypes or Rank2Types
+ Perhaps you intended to use RankNTypes
• In the type signature:
flex :: Int -> Show a => a -> String
diff --git a/testsuite/tests/typecheck/should_fail/tcfail184.stderr b/testsuite/tests/typecheck/should_fail/tcfail184.stderr
index 930ef27e6c..fd6f1fdefd 100644
--- a/testsuite/tests/typecheck/should_fail/tcfail184.stderr
+++ b/testsuite/tests/typecheck/should_fail/tcfail184.stderr
@@ -1,6 +1,6 @@
tcfail184.hs:8:19: error:
• Illegal polymorphic type: forall a. Ord a => [a] -> [a]
- Perhaps you intended to use RankNTypes or Rank2Types
+ Perhaps you intended to use RankNTypes
• In the definition of data constructor ‘MkSwizzle’
In the newtype declaration for ‘Swizzle’