summaryrefslogtreecommitdiff
path: root/compiler/GHC
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2020-03-05 20:57:24 -0500
committerRyan Scott <ryan.gl.scott@gmail.com>2020-03-06 18:29:56 -0500
commit38ae9c6219d2e339a2793385ca090851d0ba5d14 (patch)
tree9b9c98537419a33dc4484708dfa112b2913c4280 /compiler/GHC
parent067632342cf2f063b0f23c255740e2717e5e14c7 (diff)
downloadhaskell-wip/T17899.tar.gz
Use InstanceSigs in GND/DerivingVia-generated code (#17899)wip/T17899
Aside from making the generated code easier to read when `-ddump-deriv` is enabled, this makes the error message in `T15073` substantially simpler (see the updated `T15073` expected stderr). Fixes #17899.
Diffstat (limited to 'compiler/GHC')
-rw-r--r--compiler/GHC/Hs/Utils.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Hs/Utils.hs b/compiler/GHC/Hs/Utils.hs
index ac157d4caf..36e0c6d2c4 100644
--- a/compiler/GHC/Hs/Utils.hs
+++ b/compiler/GHC/Hs/Utils.hs
@@ -725,9 +725,10 @@ signatures in order to kind-check. Here is an example from #14579:
The derived Eq instance for Glurp (without any kind signatures) would be:
instance Eq a => Eq (Glurp a) where
+ (==) :: Glurp a -> Glurp a -> Bool
(==) = coerce @(Wat2 P -> Wat2 P -> Bool)
@(Glurp a -> Glurp a -> Bool)
- (==) :: Glurp a -> Glurp a -> Bool
+ (==)
(Where the visible type applications use types produced by typeToLHsType.)