blob: 4ef9e5ef52dc122019c787efea2aab49f9b23524 (
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
|
T15883c.hs:14:1: error:
• No instance for (Eq (Foo ('BoxedRep 'Lifted)))
arising from the superclasses of an instance declaration
• In the instance declaration for ‘Ord (Foo ('BoxedRep 'Lifted))’
T15883c.hs:14:1: error:
• Ambiguous type variable ‘a0’ arising from a use of ‘compare’
prevents the constraint ‘(Ord a0)’ from being solved.
Probable fix: use a type annotation to specify what ‘a0’ should be.
These potential instances exist:
instance Ord Ordering -- Defined in ‘GHC.Classes’
instance Ord (Foo ('BoxedRep 'Lifted))
-- Defined at T15883c.hs:14:1
instance Ord Integer -- Defined in ‘GHC.Num.Integer’
...plus 23 others
...plus two instances involving out-of-scope types
(use -fprint-potential-instances to see them all)
• In the expression: a1 `compare` b1
In a case alternative: MkFoo b1 -> (a1 `compare` b1)
In the expression: case b of MkFoo b1 -> (a1 `compare` b1)
When typechecking the code for ‘compare’
in a derived instance for ‘Ord (Foo ('BoxedRep 'Lifted))’:
To see the code I am typechecking, use -ddump-deriv
T15883c.hs:14:1: error:
• Ambiguous type variable ‘a1’ arising from a use of ‘<’
prevents the constraint ‘(Ord a1)’ from being solved.
Probable fix: use a type annotation to specify what ‘a1’ should be.
These potential instances exist:
instance Ord Ordering -- Defined in ‘GHC.Classes’
instance Ord (Foo ('BoxedRep 'Lifted))
-- Defined at T15883c.hs:14:1
instance Ord Integer -- Defined in ‘GHC.Num.Integer’
...plus 23 others
...plus two instances involving out-of-scope types
(use -fprint-potential-instances to see them all)
• In the expression: a1 < b1
In a case alternative: MkFoo b1 -> (a1 < b1)
In the expression: case b of MkFoo b1 -> (a1 < b1)
When typechecking the code for ‘<’
in a derived instance for ‘Ord (Foo ('BoxedRep 'Lifted))’:
To see the code I am typechecking, use -ddump-deriv
|