summaryrefslogtreecommitdiff
path: root/testsuite/tests/annotations/should_fail/annfail10.stderr
blob: 5c6f71b4861570909f497c1cf9192d7b6b4fd4a4 (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

annfail10.hs:9:1: error:
    Ambiguous type variable ‘a0’ arising from an annotation
    prevents the constraint ‘(Data a0)’ from being solved.
    Probable fix: use a type annotation to specify what ‘a0’ should be.
    These potential instances exist:
      instance (Data a, Data b) => Data (Either a b)
        -- Defined in ‘Data.Data’
      instance Data All -- Defined in ‘Data.Data’
      instance (Data (f a), Data a, Typeable f) => Data (Alt f a)
        -- Defined in ‘Data.Data’
      ...plus 39 others
      (use -fprint-potential-instances to see them all)
    In the annotation: {-# ANN f 1 #-}

annfail10.hs:9:11: error:
    Ambiguous type variable ‘a0’ arising from the literal ‘1’
    prevents the constraint ‘(Num a0)’ from being solved.
    Probable fix: use a type annotation to specify what ‘a0’ should be.
    These potential instances exist:
      instance forall k (f :: k -> *) (a :: k).
               Num (f a) =>
               Num (Alt f a)
        -- Defined in ‘Data.Monoid’
      instance Num a => Num (Product a) -- Defined in ‘Data.Monoid’
      instance Num a => Num (Sum a) -- Defined in ‘Data.Monoid’
      ...plus 14 others
      (use -fprint-potential-instances to see them all)
    In the annotation: {-# ANN f 1 #-}