[Git][ghc/ghc][master] Fix a non-compiling example in the type abstractions docs

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Sat Nov 23 04:33:55 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
6ee35024 by Drew Fenwick at 2024-11-22T23:33:26-05:00
Fix a non-compiling example in the type abstractions docs

This patch adds a missing Show constraint to a code example in the User Guide's type abstractions docs to fix issue #25422.
- - - - -


1 changed file:

- docs/users_guide/exts/type_abstractions.rst


Changes:

=====================================
docs/users_guide/exts/type_abstractions.rst
=====================================
@@ -54,7 +54,7 @@ part of the type argument using type constructors.
 
 For a somewhat-contrived example::
 
-    foo :: (Num a) => Maybe [a] -> String
+    foo :: (Show a, Num a) => Maybe [a] -> String
     foo (Nothing @[t]) = show (0 :: t)
     foo (Just @[t] xs) = show (sum xs :: t)
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6ee35024b482b5c629211d8b5c1cf4d3ce5dd888

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6ee35024b482b5c629211d8b5c1cf4d3ce5dd888
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/20241122/40727941/attachment.html>


More information about the ghc-commits mailing list