summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_fail/T10971b.stderr
blob: 0947ab1b6f70e8c5528f285ac97b807fb47bd9c4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
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 (Either a) -- Defined in ‘Data.Foldable’
        instance Foldable Maybe -- Defined in ‘Data.Foldable’
        instance Foldable ((,) a) -- Defined in ‘Data.Foldable’
        ...plus two others
        ...plus 29 instances involving out-of-scope types
        (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 (Either a) -- Defined in ‘Data.Traversable’
        instance Traversable Maybe -- Defined in ‘Data.Traversable’
        instance Traversable ((,) a) -- Defined in ‘Data.Traversable’
        ...plus two others
        ...plus 29 instances involving out-of-scope types
        (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 (Either a) -- Defined in ‘Data.Traversable’
        instance Traversable Maybe -- Defined in ‘Data.Traversable’
        instance Traversable ((,) a) -- Defined in ‘Data.Traversable’
        ...plus two others
        ...plus 29 instances involving out-of-scope types
        (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 (Either a) -- Defined in ‘Data.Foldable’
        instance Foldable Maybe -- Defined in ‘Data.Foldable’
        instance Foldable ((,) a) -- Defined in ‘Data.Foldable’
        ...plus two others
        ...plus 29 instances involving out-of-scope types
        (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)