blob: e3a3b6a40b5dafcf36a49b2c7a041098aa5ca6ce (
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
|
T8030.hs:9:3: error: [GHC-83865]
• Couldn't match expected type: Pr a
with actual type: Pr a0
NB: ‘Pr’ is a non-injective type family
The type variable ‘a0’ is ambiguous
• In the ambiguity check for ‘op1’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
When checking the class method:
op1 :: forall k (a :: k). C a => Pr a
In the class declaration for ‘C’
T8030.hs:10:3: error: [GHC-83865]
• Couldn't match type: Pr a0
with: Pr a
Expected: Pr a -> Pr a -> Pr a
Actual: Pr a0 -> Pr a0 -> Pr a0
NB: ‘Pr’ is a non-injective type family
The type variable ‘a0’ is ambiguous
• In the ambiguity check for ‘op2’
To defer the ambiguity check to use sites, enable AllowAmbiguousTypes
When checking the class method:
op2 :: forall k (a :: k). C a => Pr a -> Pr a -> Pr a
In the class declaration for ‘C’
|