diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_fail/T10971b.stderr')
-rw-r--r-- | testsuite/tests/typecheck/should_fail/T10971b.stderr | 124 |
1 files changed, 64 insertions, 60 deletions
diff --git a/testsuite/tests/typecheck/should_fail/T10971b.stderr b/testsuite/tests/typecheck/should_fail/T10971b.stderr index 546a9d88ee..8d7b2d392f 100644 --- a/testsuite/tests/typecheck/should_fail/T10971b.stderr +++ b/testsuite/tests/typecheck/should_fail/T10971b.stderr @@ -1,68 +1,72 @@ T10971b.hs:4:11: error: - Ambiguous type variable ‘t2’ arising from a use of ‘length’ - prevents the constraint ‘(Foldable t2)’ from being solved. - Relevant bindings include - x :: t2 a (bound at T10971b.hs:4:6) - f :: t2 a -> Int (bound at T10971b.hs:4:1) - Probable fix: use a type annotation to specify what ‘t2’ should be. - These potential instances exist: - instance Foldable (Const m) -- Defined in ‘Control.Applicative’ - instance Foldable ZipList -- Defined in ‘Control.Applicative’ - instance Foldable (Either a) -- Defined in ‘Data.Foldable’ - ...plus 10 others - (use -fprint-potential-instances to see them all) - In the expression: length x - In the expression: \ x -> length x - In an equation for ‘f’: f = \ x -> length x + • Ambiguous type variable ‘t2’ arising from a use of ‘length’ + prevents the constraint ‘(Foldable t2)’ from being solved. + Relevant bindings include + x :: t2 a (bound at T10971b.hs:4:6) + f :: t2 a -> Int (bound at T10971b.hs:4:1) + Probable fix: use a type annotation to specify what ‘t2’ should be. + These potential instances exist: + instance Foldable (Either a) -- Defined in ‘Data.Foldable’ + instance Foldable Maybe -- Defined in ‘Data.Foldable’ + instance Foldable ((,) a) -- Defined in ‘Data.Foldable’ + ...plus one other + ...plus 9 instance involving out-of-scope typess + (use -fprint-potential-instances to see them all) + • In the expression: length x + In the expression: \ x -> length x + In an equation for ‘f’: f = \ x -> length x T10971b.hs:5:13: error: - Ambiguous type variable ‘t1’ arising from a use of ‘fmapDefault’ - prevents the constraint ‘(Traversable t1)’ from being solved. - Relevant bindings include - x :: t1 a (bound at T10971b.hs:5:8) - g :: (a -> b) -> t1 a -> t1 b (bound at T10971b.hs:5:1) - Probable fix: use a type annotation to specify what ‘t1’ should be. - These potential instances exist: - instance Traversable (Const m) -- Defined in ‘Data.Traversable’ - instance Traversable ZipList -- Defined in ‘Data.Traversable’ - instance Traversable (Either a) -- Defined in ‘Data.Traversable’ - ...plus 10 others - (use -fprint-potential-instances to see them all) - In the expression: fmapDefault f x - In the expression: \ f x -> fmapDefault f x - In an equation for ‘g’: g = \ f x -> fmapDefault f x + • Ambiguous type variable ‘t1’ arising from a use of ‘fmapDefault’ + prevents the constraint ‘(Traversable t1)’ from being solved. + Relevant bindings include + x :: t1 a (bound at T10971b.hs:5:8) + g :: (a -> b) -> t1 a -> t1 b (bound at T10971b.hs:5:1) + Probable fix: use a type annotation to specify what ‘t1’ should be. + These potential instances exist: + instance Traversable (Either a) -- Defined in ‘Data.Traversable’ + instance Traversable Maybe -- Defined in ‘Data.Traversable’ + instance Traversable ((,) a) -- Defined in ‘Data.Traversable’ + ...plus one other + ...plus 9 instance involving out-of-scope typess + (use -fprint-potential-instances to see them all) + • In the expression: fmapDefault f x + In the expression: \ f x -> fmapDefault f x + In an equation for ‘g’: g = \ f x -> fmapDefault f x T10971b.hs:6:14: error: - Ambiguous type variable ‘t0’ arising from a use of ‘fmapDefault’ - prevents the constraint ‘(Traversable t0)’ from being solved. - Relevant bindings include - x :: t0 a (bound at T10971b.hs:6:8) - h :: (a -> b) -> t0 a -> (t0 b, Int) (bound at T10971b.hs:6:1) - Probable fix: use a type annotation to specify what ‘t0’ should be. - These potential instances exist: - instance Traversable (Const m) -- Defined in ‘Data.Traversable’ - instance Traversable ZipList -- Defined in ‘Data.Traversable’ - instance Traversable (Either a) -- Defined in ‘Data.Traversable’ - ...plus 10 others - (use -fprint-potential-instances to see them all) - In the expression: fmapDefault f x - In the expression: (fmapDefault f x, length x) - In the expression: \ f x -> (fmapDefault f x, length x) + • Ambiguous type variable ‘t0’ arising from a use of ‘fmapDefault’ + prevents the constraint ‘(Traversable t0)’ from being solved. + Relevant bindings include + x :: t0 a (bound at T10971b.hs:6:8) + h :: (a -> b) -> t0 a -> (t0 b, Int) (bound at T10971b.hs:6:1) + Probable fix: use a type annotation to specify what ‘t0’ should be. + These potential instances exist: + instance Traversable (Either a) -- Defined in ‘Data.Traversable’ + instance Traversable Maybe -- Defined in ‘Data.Traversable’ + instance Traversable ((,) a) -- Defined in ‘Data.Traversable’ + ...plus one other + ...plus 9 instance involving out-of-scope typess + (use -fprint-potential-instances to see them all) + • In the expression: fmapDefault f x + In the expression: (fmapDefault f x, length x) + In the expression: \ f x -> (fmapDefault f x, length x) T10971b.hs:6:31: error: - Ambiguous type variable ‘t0’ arising from a use of ‘length’ - prevents the constraint ‘(Foldable t0)’ from being solved. - Relevant bindings include - x :: t0 a (bound at T10971b.hs:6:8) - h :: (a -> b) -> t0 a -> (t0 b, Int) (bound at T10971b.hs:6:1) - Probable fix: use a type annotation to specify what ‘t0’ should be. - These potential instances exist: - instance Foldable (Const m) -- Defined in ‘Control.Applicative’ - instance Foldable ZipList -- Defined in ‘Control.Applicative’ - instance Foldable (Either a) -- Defined in ‘Data.Foldable’ - ...plus 10 others - (use -fprint-potential-instances to see them all) - In the expression: length x - In the expression: (fmapDefault f x, length x) - In the expression: \ f x -> (fmapDefault f x, length x) + • Ambiguous type variable ‘t0’ arising from a use of ‘length’ + prevents the constraint ‘(Foldable t0)’ from being solved. + Relevant bindings include + x :: t0 a (bound at T10971b.hs:6:8) + h :: (a -> b) -> t0 a -> (t0 b, Int) (bound at T10971b.hs:6:1) + Probable fix: use a type annotation to specify what ‘t0’ should be. + These potential instances exist: + instance Foldable (Either a) -- Defined in ‘Data.Foldable’ + instance Foldable Maybe -- Defined in ‘Data.Foldable’ + instance Foldable ((,) a) -- Defined in ‘Data.Foldable’ + ...plus one other + ...plus 9 instance involving out-of-scope typess + (use -fprint-potential-instances to see them all) + • In the expression: length x + In the expression: (fmapDefault f x, length x) + In the expression: \ f x -> (fmapDefault f x, length x) |