summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving/should_fail/deriving-via-fail5.stderr
blob: 497e95589602dbf4b44d404ad7b2f4898e16b01d (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
73
74

deriving-via-fail5.hs:8:1: error:
    • Couldn't match representation of type ‘a’ with that of ‘b’
        arising from a use of ‘GHC.Prim.coerce’
      ‘a’ is a rigid type variable bound by
        the instance declaration
        at deriving-via-fail5.hs:(8,1)-(9,24)
      ‘b’ is a rigid type variable bound by
        the instance declaration
        at deriving-via-fail5.hs:(8,1)-(9,24)
    • In the expression:
        GHC.Prim.coerce
          @(Int -> Identity b -> ShowS) @(Int -> Foo4 a -> ShowS)
          (showsPrec @(Identity b))
      In an equation for ‘showsPrec’:
          showsPrec
            = GHC.Prim.coerce
                @(Int -> Identity b -> ShowS) @(Int -> Foo4 a -> ShowS)
                (showsPrec @(Identity b))
      When typechecking the code for ‘showsPrec’
        in a derived instance for ‘Show (Foo4 a)’:
        To see the code I am typechecking, use -ddump-deriv
      In the instance declaration for ‘Show (Foo4 a)’
    • Relevant bindings include
        showsPrec :: Int -> Foo4 a -> ShowS
          (bound at deriving-via-fail5.hs:8:1)

deriving-via-fail5.hs:8:1: error:
    • Couldn't match representation of type ‘a’ with that of ‘b’
        arising from a use of ‘GHC.Prim.coerce’
      ‘a’ is a rigid type variable bound by
        the instance declaration
        at deriving-via-fail5.hs:(8,1)-(9,24)
      ‘b’ is a rigid type variable bound by
        the instance declaration
        at deriving-via-fail5.hs:(8,1)-(9,24)
    • In the expression:
        GHC.Prim.coerce
          @(Identity b -> String) @(Foo4 a -> String) (show @(Identity b))
      In an equation for ‘show’:
          show
            = GHC.Prim.coerce
                @(Identity b -> String) @(Foo4 a -> String) (show @(Identity b))
      When typechecking the code for ‘show’
        in a derived instance for ‘Show (Foo4 a)’:
        To see the code I am typechecking, use -ddump-deriv
      In the instance declaration for ‘Show (Foo4 a)’
    • Relevant bindings include
        show :: Foo4 a -> String (bound at deriving-via-fail5.hs:8:1)

deriving-via-fail5.hs:8:1: error:
    • Couldn't match representation of type ‘a’ with that of ‘b’
        arising from a use of ‘GHC.Prim.coerce’
      ‘a’ is a rigid type variable bound by
        the instance declaration
        at deriving-via-fail5.hs:(8,1)-(9,24)
      ‘b’ is a rigid type variable bound by
        the instance declaration
        at deriving-via-fail5.hs:(8,1)-(9,24)
    • In the expression:
        GHC.Prim.coerce
          @([Identity b] -> ShowS) @([Foo4 a] -> ShowS)
          (showList @(Identity b))
      In an equation for ‘showList’:
          showList
            = GHC.Prim.coerce
                @([Identity b] -> ShowS) @([Foo4 a] -> ShowS)
                (showList @(Identity b))
      When typechecking the code for ‘showList’
        in a derived instance for ‘Show (Foo4 a)’:
        To see the code I am typechecking, use -ddump-deriv
      In the instance declaration for ‘Show (Foo4 a)’
    • Relevant bindings include
        showList :: [Foo4 a] -> ShowS (bound at deriving-via-fail5.hs:8:1)