[Git][ghc/ghc][master] docs: Fix code example for NoListTuplePuns

Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC Commits: b255a8ca by Vladislav Zavialov at 2025-06-02T16:00:12-04:00 docs: Fix code example for NoListTuplePuns Without the fix, the example produces an error: Test.hs:11:3: error: [GHC-45219] • Data constructor ‘Tuple’ returns type ‘Tuple2 a b’ instead of an instance of its parent type ‘Tuple a’ • In the definition of data constructor ‘Tuple’ In the data type declaration for ‘Tuple’ Fortunately, a one line change makes it compile. - - - - - 1 changed file: - docs/users_guide/exts/data_kinds.rst Changes: ===================================== docs/users_guide/exts/data_kinds.rst ===================================== @@ -349,7 +349,7 @@ The earlier example would need to be rewritten like this: :: HCons :: a -> HList t -> HList (a : t) data Tuple :: Tuple2 Type Type -> Type where - Tuple :: a -> b -> Tuple2 a b + Tuple :: a -> b -> Tuple (a, b) foo0 :: HList [] foo0 = HNil View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b255a8ca815920f5219dd5136bbb505f... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/b255a8ca815920f5219dd5136bbb505f... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Marge Bot (@marge-bot)