[GHC] #11065: Outdated documentation for foldl and friends
#11065: Outdated documentation for foldl and friends -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Documentation | Version: 7.10.2 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Straight from `Data.Foldable`, here is the documentation for `foldl`: {{{ -- | Left-associative fold of a structure. -- -- @'foldl' f z = 'Prelude.foldl' f z . 'toList'@ }}} But, of course, `Prelude.foldl` is the same `foldl`! There are other functions with similar problems. When revising these, please put in (back?) examples of how these work, at least on lists. I've been doing functional programming for some time, and I still like to look at examples to make sure that I'm getting my `foldl` and `foldr` straight. Maybe it's because my brain is small, but we don't want to exclude people with small brains! -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11065> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11065: Outdated documentation for foldl and friends -------------------------------------+------------------------------------- Reporter: goldfire | Owner: bgamari Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Documentation | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * owner: => bgamari Old description:
Straight from `Data.Foldable`, here is the documentation for `foldl`:
{{{ -- | Left-associative fold of a structure. -- -- @'foldl' f z = 'Prelude.foldl' f z . 'toList'@ }}}
But, of course, `Prelude.foldl` is the same `foldl`!
There are other functions with similar problems.
When revising these, please put in (back?) examples of how these work, at least on lists. I've been doing functional programming for some time, and I still like to look at examples to make sure that I'm getting my `foldl` and `foldr` straight. Maybe it's because my brain is small, but we don't want to exclude people with small brains!
New description: Straight from `Data.Foldable`, here is the documentation for `foldl`: {{{#!hs -- | Left-associative fold of a structure. -- -- @'foldl' f z = 'Prelude.foldl' f z . 'toList'@ }}} But, of course, `Prelude.foldl` is the same `foldl`! There are other functions with similar problems. When revising these, please put in (back?) examples of how these work, at least on lists. I've been doing functional programming for some time, and I still like to look at examples to make sure that I'm getting my `foldl` and `foldr` straight. Maybe it's because my brain is small, but we don't want to exclude people with small brains! -- -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11065#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11065: Outdated documentation for foldl and friends -------------------------------------+------------------------------------- Reporter: goldfire | Owner: bgamari Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Documentation | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * cc: core-libraries-committee, ekmett (added) Old description:
Straight from `Data.Foldable`, here is the documentation for `foldl`:
{{{#!hs -- | Left-associative fold of a structure. -- -- @'foldl' f z = 'Prelude.foldl' f z . 'toList'@ }}}
But, of course, `Prelude.foldl` is the same `foldl`!
There are other functions with similar problems.
When revising these, please put in (back?) examples of how these work, at least on lists. I've been doing functional programming for some time, and I still like to look at examples to make sure that I'm getting my `foldl` and `foldr` straight. Maybe it's because my brain is small, but we don't want to exclude people with small brains!
New description: Straight from `Data.Foldable`, here is the documentation for `foldl`: {{{ -- | Left-associative fold of a structure. -- -- @'foldl' f z = 'Prelude.foldl' f z . 'toList'@ }}} But, of course, `Prelude.foldl` is the same `foldl`! There are other functions with similar problems. When revising these, please put in (back?) examples of how these work, at least on lists. I've been doing functional programming for some time, and I still like to look at examples to make sure that I'm getting my `foldl` and `foldr` straight. Maybe it's because my brain is small, but we don't want to exclude people with small brains! -- Comment: Could anyone on the Core Libraries Committee nail this in the next few days. It's not hard! Thanks Simon -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11065#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11065: Outdated documentation for foldl and friends -------------------------------------+------------------------------------- Reporter: goldfire | Owner: bgamari Type: bug | Status: patch Priority: highest | Milestone: 8.0.1 Component: Documentation | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1617 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => patch * differential: => Phab:D1617 Comment: goldfire, could you comment on Phab:D1617 and describe what else you would like to see in this documentation? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11065#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11065: Outdated documentation for foldl and friends -------------------------------------+------------------------------------- Reporter: goldfire | Owner: bgamari Type: bug | Status: patch Priority: highest | Milestone: 8.0.1 Component: Documentation | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1617 Wiki Page: | -------------------------------------+------------------------------------- Comment (by goldfire): Done. Thanks for doing this. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11065#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11065: Outdated documentation for foldl and friends -------------------------------------+------------------------------------- Reporter: goldfire | Owner: bgamari Type: bug | Status: patch Priority: highest | Milestone: 8.0.1 Component: Documentation | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1617 Wiki Page: | -------------------------------------+------------------------------------- Comment (by thomie): Replying to [ticket:11065 goldfire]:
I've been doing functional programming for some time, and I still like to look at examples to make sure that I'm getting my `foldl` and `foldr` straight.
This video by Tony Morris is great: [http://vimeo.com/64673035 Explain List Folds to Yourself]. It's 48 minutes, but you'll never mix `foldl` and `foldr` up again. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11065#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11065: Outdated documentation for foldl and friends -------------------------------------+------------------------------------- Reporter: goldfire | Owner: bgamari Type: bug | Status: patch Priority: highest | Milestone: 8.0.1 Component: Documentation | Version: 7.10.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1617 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"7cb893f562346d5aa986bd88863335aabbf7e95f/ghc" 7cb893f/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="7cb893f562346d5aa986bd88863335aabbf7e95f" Update and improve documentation in Data.Foldable Previously there were a few obsolete references to `Data.List` and the descriptions were lacking examples. Fixes #11065. Test Plan: Read it. Reviewers: ekmett, goldfire, hvr, austin Reviewed By: hvr Subscribers: nomeata, thomie Differential Revision: https://phabricator.haskell.org/D1617 GHC Trac Issues: #11065 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11065#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#11065: Outdated documentation for foldl and friends -------------------------------------+------------------------------------- Reporter: goldfire | Owner: bgamari Type: bug | Status: closed Priority: highest | Milestone: 8.0.1 Component: Documentation | Version: 7.10.2 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1617 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed Comment: Merged. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11065#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC