summaryrefslogtreecommitdiff
path: root/testsuite/tests/overloadedlists
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/overloadedlists')
-rw-r--r--testsuite/tests/overloadedlists/should_fail/overloadedlistsfail01.stderr67
-rw-r--r--testsuite/tests/overloadedlists/should_fail/overloadedlistsfail02.stderr24
2 files changed, 48 insertions, 43 deletions
diff --git a/testsuite/tests/overloadedlists/should_fail/overloadedlistsfail01.stderr b/testsuite/tests/overloadedlists/should_fail/overloadedlistsfail01.stderr
index dbc250d794..7a43f4f778 100644
--- a/testsuite/tests/overloadedlists/should_fail/overloadedlistsfail01.stderr
+++ b/testsuite/tests/overloadedlists/should_fail/overloadedlistsfail01.stderr
@@ -1,38 +1,41 @@
overloadedlistsfail01.hs:5:8: error:
- Ambiguous type variable ‘a0’ arising from a use of ‘print’
- prevents the constraint ‘(Show a0)’ from being solved.
- Probable fix: use a type annotation to specify what ‘a0’ should be.
- These potential instances exist:
- instance [safe] Show Version -- Defined in ‘Data.Version’
- instance Show Module -- Defined in ‘GHC.Show’
- instance Show Ordering -- Defined in ‘GHC.Show’
- ...plus 26 others
- (use -fprint-potential-instances to see them all)
- In the expression: print [1]
- In an equation for ‘main’: main = print [1]
+ • Ambiguous type variable ‘a0’ arising from a use of ‘print’
+ prevents the constraint ‘(Show a0)’ from being solved.
+ Probable fix: use a type annotation to specify what ‘a0’ should be.
+ These potential instances exist:
+ instance Show Ordering -- Defined in ‘GHC.Show’
+ instance Show Integer -- Defined in ‘GHC.Show’
+ instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’
+ ...plus 22 others
+ ...plus four instance involving out-of-scope typess
+ (use -fprint-potential-instances to see them all)
+ • In the expression: print [1]
+ In an equation for ‘main’: main = print [1]
overloadedlistsfail01.hs:5:14: error:
- Ambiguous type variable ‘a0’ arising from an overloaded list
- prevents the constraint ‘(IsList a0)’ from being solved.
- Probable fix: use a type annotation to specify what ‘a0’ should be.
- These potential instances exist:
- instance IsList Version -- Defined in ‘GHC.Exts’
- instance IsList [a] -- Defined in ‘GHC.Exts’
- In the first argument of ‘print’, namely ‘[1]’
- In the expression: print [1]
- In an equation for ‘main’: main = print [1]
+ • Ambiguous type variable ‘a0’ arising from an overloaded list
+ prevents the constraint ‘(GHC.Exts.IsList a0)’ from being solved.
+ Probable fix: use a type annotation to specify what ‘a0’ should be.
+ These potential instances exist:
+ instance GHC.Exts.IsList [a] -- Defined in ‘GHC.Exts’
+ ...plus one instance involving out-of-scope types
+ (use -fprint-potential-instances to see them all)
+ • In the first argument of ‘print’, namely ‘[1]’
+ In the expression: print [1]
+ In an equation for ‘main’: main = print [1]
overloadedlistsfail01.hs:5:15: error:
- Ambiguous type variable ‘a0’ arising from the literal ‘1’
- prevents the constraint ‘(Num (Item a0))’ from being solved.
- Probable fix: use a type annotation to specify what ‘a0’ should be.
- These potential instances exist:
- instance Num Integer -- Defined in ‘GHC.Num’
- instance Num Double -- Defined in ‘GHC.Float’
- instance Num Float -- Defined in ‘GHC.Float’
- ...plus two others
- (use -fprint-potential-instances to see them all)
- In the expression: 1
- In the first argument of ‘print’, namely ‘[1]’
- In the expression: print [1]
+ • Ambiguous type variable ‘a0’ arising from the literal ‘1’
+ prevents the constraint ‘(Num
+ (GHC.Exts.Item a0))’ from being solved.
+ Probable fix: use a type annotation to specify what ‘a0’ should be.
+ These potential instances exist:
+ instance Num Integer -- Defined in ‘GHC.Num’
+ instance Num Double -- Defined in ‘GHC.Float’
+ instance Num Float -- Defined in ‘GHC.Float’
+ ...plus two others
+ (use -fprint-potential-instances to see them all)
+ • In the expression: 1
+ In the first argument of ‘print’, namely ‘[1]’
+ In the expression: print [1]
diff --git a/testsuite/tests/overloadedlists/should_fail/overloadedlistsfail02.stderr b/testsuite/tests/overloadedlists/should_fail/overloadedlistsfail02.stderr
index 4597e1ce56..e0be7ab4e5 100644
--- a/testsuite/tests/overloadedlists/should_fail/overloadedlistsfail02.stderr
+++ b/testsuite/tests/overloadedlists/should_fail/overloadedlistsfail02.stderr
@@ -1,11 +1,13 @@
-
-overloadedlistsfail02.hs:6:8:
- No instance for (IsList Foo) arising from an overloaded list
- In the expression: [7]
- In an equation for ‘test’: test = [7]
-
-overloadedlistsfail02.hs:6:9:
- No instance for (Num (Item Foo)) arising from the literal ‘7’
- In the expression: 7
- In the expression: [7]
- In an equation for ‘test’: test = [7]
+
+overloadedlistsfail02.hs:6:8: error:
+ • No instance for (GHC.Exts.IsList Foo)
+ arising from an overloaded list
+ • In the expression: [7]
+ In an equation for ‘test’: test = [7]
+
+overloadedlistsfail02.hs:6:9: error:
+ • No instance for (Num (GHC.Exts.Item Foo))
+ arising from the literal ‘7’
+ • In the expression: 7
+ In the expression: [7]
+ In an equation for ‘test’: test = [7]