[Git][ghc/ghc][master] Fix non-compiling extensible record `HasField` example
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Wed Jun 12 16:52:50 UTC 2024
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
1b1523b1 by George Thomas at 2024-06-12T12:52:18-04:00
Fix non-compiling extensible record `HasField` example
- - - - -
1 changed file:
- docs/users_guide/exts/hasfield.rst
Changes:
=====================================
docs/users_guide/exts/hasfield.rst
=====================================
@@ -131,7 +131,7 @@ string in the type-level list of fields: ::
Nil :: Record '[]
Cons :: Proxy x -> a -> Record xs -> Record ('(x, a) ': xs)
- instance HasField x (Record ('(x, a) ': xs)) a where
+ instance {-# OVERLAPPING #-} HasField x (Record ('(x, a) ': xs)) a where
getField (Cons _ v _) = v
instance HasField x (Record xs) a => HasField x (Record ('(y, b) ': xs)) a where
getField (Cons _ _ r) = getField @x r
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1b1523b1701bd14005048d190d92e808c7d3f7e4
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/1b1523b1701bd14005048d190d92e808c7d3f7e4
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240612/d7c9a97f/attachment-0001.html>
More information about the ghc-commits
mailing list