File tree Expand file tree Collapse file tree 6 files changed +44
-1
lines changed
message-index/messages/GHC-39999
overloaded-record-dot-selector-not-in-scope Expand file tree Collapse file tree 6 files changed +44
-1
lines changed Original file line number Diff line number Diff line change 1
1
---
2
2
title : A usage of (==) on a data type which doesn‘t have an instance for Eq.
3
+ order : 0
3
4
---
4
5
5
6
## Error message
Original file line number Diff line number Diff line change 1
1
---
2
- title : A usage of `x.foo` with the field `foo` not being in scape
2
+ title : A usage of `x.foo` with the field `foo` not being in scope
3
+ order : 2
3
4
---
4
5
5
6
## Error message
Original file line number Diff line number Diff line change
1
+ import Data.Functor.Classes (Show1 (.. ))
2
+
3
+ newtype Foo a = Foo a
4
+
5
+ instance Show a => Show (Foo a ) where
6
+ show (Foo a) = " Foo " ++ show a
7
+
8
+ instance Show1 Foo where
9
+ liftShowsPrec showsPrec _showList prec (Foo a) rest = " Foo " ++ showsPrec prec a rest
Original file line number Diff line number Diff line change
1
+ import Data.Functor.Classes (Show1 (.. ))
2
+
3
+ newtype Foo a = Foo a
4
+
5
+ instance Show1 Foo where
6
+ liftShowsPrec showsPrec _showList prec (Foo a) rest = " Foo " ++ showsPrec prec a rest
Original file line number Diff line number Diff line change
1
+ ---
2
+ title : Missing superclass declaration
3
+ order : 3
4
+ ---
5
+
6
+ ### Error message on GHC 9.6.2
7
+
8
+ ```
9
+ Main.hs:5:10: error: [GHC-39999]
10
+ • Could not deduce ‘Show (Foo a)’
11
+ arising from the head of a quantified constraint
12
+ arising from the superclasses of an instance declaration
13
+ from the context: Show a
14
+ bound by a quantified context at Main.hs:5:10-18
15
+ • In the instance declaration for ‘Show1 Foo’
16
+ |
17
+ 5 | instance Show1 Foo where
18
+ | ^^^^^^^^^
19
+ ```
20
+
21
+ ## Explanation
22
+
23
+ The [ ` Show1 ` ] ( https://hackage.haskell.org/package/base-4.18.0.0/docs/Data-Functor-Classes.html#t:Show1 ) class has
24
+ changed in GHC 9.6 to require a quantified superclass constraint ` Show ` . To fix this error, for every `instance
25
+ Show1` declaration add a corresponding ` instance Show` declaration for the same data type.
Original file line number Diff line number Diff line change 1
1
---
2
2
title : A usage of `+` on a too polymorphic variable.
3
+ order : 1
3
4
---
4
5
5
6
## Error message
You can’t perform that action at this time.
0 commit comments