diff options
author | Swann Moreau <evertedsphere@gmail.com> | 2022-06-30 10:08:07 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-08-19 18:29:21 -0400 |
commit | 51ffd00906d1c75dc72c71ba4216b480996c8ce2 (patch) | |
tree | bad8746acded2a4da4de1ef3a3eb90c51e7f66d9 /testsuite/tests/gadt | |
parent | e5567289c576a76f62bd78bd823a824c7ca83de6 (diff) | |
download | haskell-51ffd00906d1c75dc72c71ba4216b480996c8ce2.tar.gz |
Print constraints in quotes (#21167)
This patch improves the uniformity of error message formatting by
printing constraints in quotes, as we do for types.
Fix #21167
Diffstat (limited to 'testsuite/tests/gadt')
-rw-r--r-- | testsuite/tests/gadt/gadt-escape1.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/gadt/gadt13.stderr | 2 | ||||
-rw-r--r-- | testsuite/tests/gadt/gadt21.stderr | 26 | ||||
-rw-r--r-- | testsuite/tests/gadt/gadt7.stderr | 2 |
4 files changed, 16 insertions, 16 deletions
diff --git a/testsuite/tests/gadt/gadt-escape1.stderr b/testsuite/tests/gadt/gadt-escape1.stderr index b237361699..fcc562f56e 100644 --- a/testsuite/tests/gadt/gadt-escape1.stderr +++ b/testsuite/tests/gadt/gadt-escape1.stderr @@ -1,6 +1,6 @@ gadt-escape1.hs:19:58: error: - • Could not deduce (p ~ ExpGADT Int) + • Could not deduce ‘p ~ ExpGADT Int’ from the context: t ~ Int bound by a pattern with constructor: ExpInt :: Int -> ExpGADT Int, in a case alternative diff --git a/testsuite/tests/gadt/gadt13.stderr b/testsuite/tests/gadt/gadt13.stderr index 83b0e73e53..b7eb4e9bd3 100644 --- a/testsuite/tests/gadt/gadt13.stderr +++ b/testsuite/tests/gadt/gadt13.stderr @@ -1,6 +1,6 @@ gadt13.hs:15:13: error: - • Could not deduce (p ~ (String -> [Char])) + • Could not deduce ‘p ~ (String -> [Char])’ from the context: a ~ Int bound by a pattern with constructor: I :: Int -> Term Int, in an equation for ‘shw’ diff --git a/testsuite/tests/gadt/gadt21.stderr b/testsuite/tests/gadt/gadt21.stderr index 7259672c7a..999448bb71 100644 --- a/testsuite/tests/gadt/gadt21.stderr +++ b/testsuite/tests/gadt/gadt21.stderr @@ -1,14 +1,14 @@ -gadt21.hs:21:60: - Could not deduce (Ord a1) arising from a use of ‘f’ - from the context: a ~ Set a1 - bound by a pattern with constructor: - TypeSet :: forall a. Type a -> Type (Set a), - in an equation for ‘withOrdDynExpr’ - at gadt21.hs:21:35-43 - Possible fix: - add (Ord a1) to the context of the data constructor ‘TypeSet’ - In the first argument of ‘Just’, namely ‘(f e)’ - In the expression: Just (f e) - In an equation for ‘withOrdDynExpr’: - withOrdDynExpr (DynExpr e@(Const (TypeSet _) _)) f = Just (f e) +gadt21.hs:21:60: error: + • Could not deduce ‘Ord a1’ arising from a use of ‘f’ + from the context: a ~ Set a1 + bound by a pattern with constructor: + TypeSet :: forall a. Type a -> Type (Set a), + in an equation for ‘withOrdDynExpr’ + at gadt21.hs:21:35-43 + Possible fix: + add (Ord a1) to the context of the data constructor ‘TypeSet’ + • In the first argument of ‘Just’, namely ‘(f e)’ + In the expression: Just (f e) + In an equation for ‘withOrdDynExpr’: + withOrdDynExpr (DynExpr e@(Const (TypeSet _) _)) f = Just (f e) diff --git a/testsuite/tests/gadt/gadt7.stderr b/testsuite/tests/gadt/gadt7.stderr index f36b44d09d..f1e7237dac 100644 --- a/testsuite/tests/gadt/gadt7.stderr +++ b/testsuite/tests/gadt/gadt7.stderr @@ -1,6 +1,6 @@ gadt7.hs:16:38: error: - • Could not deduce (p1 ~ p2) + • Could not deduce ‘p1 ~ p2’ from the context: a ~ Int bound by a pattern with constructor: K :: T Int, in a case alternative |