[GHC] #9586: Implement Traversable/Foldable-Burning-Bridges Proposal

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: libraries/base | Version: Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Difficult (2-5 | Type of failure: days) | None/Unknown Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- More details to follow. I've created this ticket to be able to refer to from related preparatory commits. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: | Version: libraries/base | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Difficult (2-5 Unknown/Multiple | days) Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | Differential Revisions: Phab:D209 | -------------------------------------+------------------------------------- Changes (by hvr): * differential: => Phab:D209 Comment: The medium-sized patch in Phab:D209 implements the **first phase**, namely to re-export solely the two type-classes `Foldable` and `Traversable` (sans any methods) from `Prelude` -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: hvr
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: | Version:
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Difficult (2-5
Unknown/Multiple | days)
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: Phab:D209 |
-------------------------------------+-------------------------------------
Comment (by Herbert Valerio Riedel

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: | Version: libraries/base | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Difficult (2-5 Unknown/Multiple | days) Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | Differential Revisions: Phab:D209 | -------------------------------------+------------------------------------- Description changed by hvr: Old description:
More details to follow. I've created this ticket to be able to refer to from related preparatory commits.
New description: More details to follow. I've created this ticket to be able to refer to from related preparatory commits. In a nutshell the goal (more or less) of this proposal is to be able to compile code like the following w/o errors (due to conflicting definitions): {{{#!hs module XPrelude (module X) where import Data.Foldable as X import Data.Traversable as X import Data.List as X import Control.Monad as X import Prelude as X }}} -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: | Version: libraries/base | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Difficult (2-5 Unknown/Multiple | days) Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | Differential Revisions: Phab:D209 | -------------------------------------+------------------------------------- Comment (by dfeuer): I think if you're doing this, it would make sense to generalize these too: {{{#!hs null :: (Foldable f) => f a -> Bool null = foldr (const True) False length :: (Foldable f) => f a -> Int length = foldl' (\k _ -> k + 1) 0 --and even though it's a very strange thing already genericLength :: (Foldable f, Num n) => f a -> n genericLength = foldr (\_ k -> 1 + k) 0 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: | Version: libraries/base | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Difficult (2-5 Unknown/Multiple | days) Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | Differential Revisions: Phab:D209 | -------------------------------------+------------------------------------- Comment (by dfeuer): Replying to [comment:4 dfeuer]: rwbarton points out that there are optimized versions of these for various things, and that most containers use `size` instead of `length`. Therefore, I would propose instead adding `size` and `null` to the `Foldable` class, with default definitions as above. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: hvr
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: | Version:
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Difficult (2-5
Unknown/Multiple | days)
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: Phab:D209 |
-------------------------------------+-------------------------------------
Comment (by Herbert Valerio Riedel

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: hvr
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: | Version:
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Difficult (2-5
Unknown/Multiple | days)
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: Phab:D209 |
-------------------------------------+-------------------------------------
Comment (by Herbert Valerio Riedel

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: hvr
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: | Version:
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Difficult (2-5
Unknown/Multiple | days)
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: Phab:D209 |
-------------------------------------+-------------------------------------
Comment (by Herbert Valerio Riedel

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: hvr
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: | Version:
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Difficult (2-5
Unknown/Multiple | days)
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: Phab:D209 |
-------------------------------------+-------------------------------------
Comment (by Herbert Valerio Riedel

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: hvr
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: | Version:
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Difficult (2-5
Unknown/Multiple | days)
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: Phab:D209 |
-------------------------------------+-------------------------------------
Comment (by Herbert Valerio Riedel

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: | Version: libraries/base | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Difficult (2-5 Unknown/Multiple | days) Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | Differential Revisions: Phab:D209 | -------------------------------------+------------------------------------- Comment (by dfeuer): rwbarton mentions also `scanl1` and `scanr1`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:11 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: hvr
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: | Version:
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Difficult (2-5
Unknown/Multiple | days)
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: Phab:D209 |
-------------------------------------+-------------------------------------
Comment (by Herbert Valerio Riedel

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: hvr
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: | Version:
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Difficult (2-5
Unknown/Multiple | days)
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: Phab:D209 |
-------------------------------------+-------------------------------------
Comment (by Herbert Valerio Riedel

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: hvr
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: | Version:
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Difficult (2-5
Unknown/Multiple | days)
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: Phab:D209 |
-------------------------------------+-------------------------------------
Comment (by Herbert Valerio Riedel

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: | Version: libraries/base | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Difficult (2-5 Unknown/Multiple | days) Type of failure: | Blocked By: None/Unknown | Related Tickets: #9621 Test Case: | Blocking: | Differential Revisions: Phab:D209 | -------------------------------------+------------------------------------- Changes (by hvr): * related: => #9621 Comment: Replying to [comment:5 dfeuer]:
rwbarton points out that there are optimized versions of these for various things, and that most containers use `size` instead of `length`. Therefore, I would propose instead adding `size` and `null` to the `Foldable` class, with default definitions as above.
Extending `Foldable` has become a ticket of its own at #9621 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: hvr
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: | Version:
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Difficult (2-5
Unknown/Multiple | days)
Type of failure: | Blocked By:
None/Unknown | Related Tickets: #9621
Test Case: |
Blocking: |
Differential Revisions: Phab:D209 |
-------------------------------------+-------------------------------------
Comment (by Herbert Valerio Riedel

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: hvr
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: | Version:
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Difficult (2-5
Unknown/Multiple | days)
Type of failure: | Blocked By:
None/Unknown | Related Tickets: #9621
Test Case: |
Blocking: |
Differential Revisions: Phab:D209 |
-------------------------------------+-------------------------------------
Comment (by Herbert Valerio Riedel

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: hvr
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: | Version:
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Difficult (2-5
Unknown/Multiple | days)
Type of failure: | Blocked By:
None/Unknown | Related Tickets: #9621
Test Case: |
Blocking: |
Differential Revisions: Phab:D209 |
-------------------------------------+-------------------------------------
Comment (by Herbert Valerio Riedel

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: | Version: libraries/base | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Difficult (2-5 Unknown/Multiple | days) Type of failure: | Blocked By: None/Unknown | Related Tickets: #9621 Test Case: | Blocking: | Differential Revisions: Phab:D209 | -------------------------------------+------------------------------------- Comment (by goldfire): See also comment:4:ticket:9568 and comment:5:ticket:9568 which were posted to the wrong ticket. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:19 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

See also comment:4:ticket:9568 and comment:5:ticket:9568 which were
#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: | Version: libraries/base | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Difficult (2-5 Unknown/Multiple | days) Type of failure: | Blocked By: None/Unknown | Related Tickets: #9621 Test Case: | Blocking: | Differential Revisions: Phab:D209 | -------------------------------------+------------------------------------- Comment (by hvr): Replying to [comment:19 goldfire]: posted to the wrong ticket. Thanks for noticing. With so many commits this was bound to happen... :-) ----- In [changeset:"05cf18f883bf2d49b53a1d25cb57eff3333eb0c9/ghc"]: {{{ Generalise (some of) Data.List to Foldables (re #9568) This replaces the entities in Data.List conflicting with Data.Foldable with re-exports of the generalised version from Data.Foldable. As of this commit, the following compiles w/o error module XPrelude (module X) where import Control.Monad as X import Data.Foldable as X import Data.List as X import Prelude as X Reviewed By: austin, dfeuer, ekmett Differential Revision: https://phabricator.haskell.org/D229 }}} ----- In [changeset:"1f7f46f94a95ab7fc6f3101da7c02529e1964f24/ghc"]: {{{ Generalise Data.List/Control.Monad to Foldable/Traversable This flips the switch and replaces the entities in `Data.List`/`Control.Monad` conflicting with `Data.{Foldable,Traversable}` with re-exports of the more general versions. As of this commit, the code below (which is also added as a test-case) compiles w/o error. module XPrelude (module X) where import Control.Monad as X import Data.Foldable as X import Data.List as X import Data.Monoid as X import Data.Traversable as X import Prelude as X This addresses #9568 Reviewed By: ekmett, austin Differential Revision: https://phabricator.haskell.org/D235 }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:20 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: hvr
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: | Version:
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Difficult (2-5
Unknown/Multiple | days)
Type of failure: | Blocked By:
None/Unknown | Related Tickets: #9621
Test Case: |
Blocking: |
Differential Revisions: Phab:D209 |
-------------------------------------+-------------------------------------
Comment (by Herbert Valerio Riedel

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: hvr
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: | Version:
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Difficult (2-5
Unknown/Multiple | days)
Type of failure: | Blocked By:
None/Unknown | Related Tickets: #9621
Test Case: |
Blocking: |
Differential Revisions: Phab:D209 |
-------------------------------------+-------------------------------------
Comment (by Herbert Valerio Riedel

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: hvr
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: | Version:
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Difficult (2-5
Unknown/Multiple | days)
Type of failure: | Blocked By:
None/Unknown | Related Tickets: #9621
Test Case: |
Blocking: |
Differential Revisions: Phab:D209 |
-------------------------------------+-------------------------------------
Comment (by Herbert Valerio Riedel

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: hvr
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: | Version:
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Difficult (2-5
Unknown/Multiple | days)
Type of failure: | Blocked By:
None/Unknown | Related Tickets: #9621
Test Case: |
Blocking: |
Differential Revisions: Phab:D209 |
-------------------------------------+-------------------------------------
Comment (by Herbert Valerio Riedel

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: | Version: libraries/base | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Difficult (2-5 Unknown/Multiple | days) Type of failure: | Blocked By: None/Unknown | Related Tickets: #9621 Test Case: | Blocking: | Differential Revisions: Phab:D209 | -------------------------------------+------------------------------------- Description changed by hvr: Old description:
More details to follow. I've created this ticket to be able to refer to from related preparatory commits.
In a nutshell the goal (more or less) of this proposal is to be able to compile code like the following w/o errors (due to conflicting definitions):
{{{#!hs module XPrelude (module X) where
import Data.Foldable as X import Data.Traversable as X import Data.List as X import Control.Monad as X import Prelude as X }}}
New description: More details to follow. I've created this ticket to be able to refer to from related preparatory commits. In a nutshell the FTP (Foldable/Traversable-Proposal) sub-goal of the BBP (Burning-Bridges-Proposal) includes to be able to compile code like the following w/o errors (due to conflicting definitions): {{{#!hs module XPrelude (module X) where import Data.Foldable as X import Data.Traversable as X import Data.List as X import Control.Monad as X import Prelude as X }}} Other goals include to generalise/weaken type-signatures where possible w/o breaking (much) compatibility with existing code. An in-depth design- document is in the works. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:25 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: hvr
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: | Version:
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Difficult (2-5
Unknown/Multiple | days)
Type of failure: | Blocked By:
None/Unknown | Related Tickets: #9621
Test Case: |
Blocking: |
Differential Revisions: Phab:D209 |
-------------------------------------+-------------------------------------
Comment (by rwbarton):
Replying to [comment:18 Herbert Valerio Riedel
In [changeset:"b8f583928fa6cb5371a872fc73080d2002dd87d9/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="b8f583928fa6cb5371a872fc73080d2002dd87d9" Export `Monoid(..)`/`Foldable(..)`/`Traversable(..)` from Prelude
This finally exposes also the methods of these 3 classes in the Prelude in order to allow to define basic class instances w/o needing imports.
This almost completes the primary goal of #9586
NOTE: `fold`, `foldl'`, `foldr'`, and `toList` are not exposed yet, as they require upstream fixes for at least `containers` and `bytestring`, and are not required for defining basic instances.
Reviewed By: ekmett, austin
Differential Revision: https://phabricator.haskell.org/D236 }}}
This patch seems to be unrelated to the scope of this ticket. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:26 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: hvr
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: | Version:
libraries/base | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Difficult (2-5
Unknown/Multiple | days)
Type of failure: | Blocked By:
None/Unknown | Related Tickets: #9621
Test Case: |
Blocking: |
Differential Revisions: Phab:D209 |
-------------------------------------+-------------------------------------
Comment (by rwbarton):
Replying to [comment:24 Herbert Valerio Riedel
In [changeset:"a07ce1654ac5b8033f2daf9270c6e182415b69ca/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="a07ce1654ac5b8033f2daf9270c6e182415b69ca" Generalise `Control.Monad.{when,unless,guard}`
Generalise `when`/`unless`from `Monad` to `Applicative` and `guard` from `MonadPlus` to `Alternative` respectively.
This was made possible by the AMP and is somewhat related to #9586 (but generalising in the context of the AMP instead of the FTP)
Reviewed By: ekmett, austin
Differential Revision: https://phabricator.haskell.org/D253 }}}
Off-topic for this ticket but why not also generalize `filterM`, `forever`, ..., `replicateM_`? Are there hangups about the letter M in the names of some of these functions? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:27 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: | Version: libraries/base | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Difficult (2-5 Unknown/Multiple | days) Type of failure: | Blocked By: None/Unknown | Related Tickets: #9621 Test Case: | Blocking: | Differential Revisions: Phab:D209 | -------------------------------------+------------------------------------- Comment (by dfeuer): Replying to [comment:27 rwbarton]:
Off-topic for this ticket but why not also generalize `filterM`, `forever`, ..., `replicateM_`? Are there hangups about the letter M in the names of some of these functions?
`filterM` cannot be generalized to `Traversable` in any sensible way—it needs something stronger. `forever` and `replicateM_` should be easy. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:28 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: | Version: libraries/base | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Difficult (2-5 Unknown/Multiple | days) Type of failure: | Blocked By: None/Unknown | Related Tickets: #9621 Test Case: | Blocking: | Differential Revisions: Phab:D209 | -------------------------------------+------------------------------------- Comment (by rwbarton): Replying to [comment:28 dfeuer]:
Replying to [comment:27 rwbarton]:
Off-topic for this ticket but why not also generalize `filterM`, `forever`, ..., `replicateM_`? Are there hangups about the letter M in the names of some of these functions?
`filterM` cannot be generalized to `Traversable` in any sensible way—it needs something stronger. `forever` and `replicateM_` should be easy.
I mean generalize from Monad to Applicative, not from [] to Traversable. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:29 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal
-------------------------------------+-------------------------------------
Reporter: hvr | Owner: hvr
Type: task | Status: new
Priority: normal | Milestone: 7.10.1
Component: Core | Version:
Libraries | Keywords:
Resolution: | Architecture: Unknown/Multiple
Operating System: | Difficulty: Difficult (2-5
Unknown/Multiple | days)
Type of failure: | Blocked By:
None/Unknown | Related Tickets: #9621
Test Case: |
Blocking: |
Differential Revisions: Phab:D209 |
-------------------------------------+-------------------------------------
Comment (by Herbert Valerio Riedel

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: closed Priority: normal | Milestone: 7.10.1 Component: Core Libraries | Version: Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: #9621 | Blocking: | Differential Revisions: Phab:D209 -------------------------------------+------------------------------------- Changes (by hvr): * cc: core-libraries-committee@… (added) * status: new => closed * resolution: => fixed Comment: Let's close this; everything that was planned for milestone:7.10.1 has been implemented -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:32 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: closed Priority: normal | Milestone: 7.10.1 Component: Core Libraries | Version: Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: #9621 | Blocking: | Differential Revisions: Phab:D209 -------------------------------------+------------------------------------- Comment (by George): The description at the top says "An in-depth design-document is in the works." Was that done? If so, is there a link to it? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:33 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: closed Priority: normal | Milestone: 7.10.1 Component: Core Libraries | Version: Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: #9621 | Blocking: | Differential Revisions: Phab:D209 -------------------------------------+------------------------------------- Comment (by ekmett): https://wiki.haskell.org/Foldable_Traversable_In_Prelude is the page we're grooming for that purpose. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:34 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: closed Priority: normal | Milestone: 7.10.1 Component: Core Libraries | Version: Resolution: fixed | Keywords: report- Operating System: Unknown/Multiple | impact Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: #9621 | Test Case: | Blocking: | Differential Revisions: Phab:D209 -------------------------------------+------------------------------------- Comment (by George): Given the ongoing discussion in e.g. the Libraries mailing list should the status still be closed? Are all the proposed changes in 7.10RC2? If so when will the 7.10 doc be updated to reflect them? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:36 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: closed Priority: normal | Milestone: 7.10.1 Component: Core Libraries | Version: Resolution: fixed | Keywords: report- Operating System: Unknown/Multiple | impact Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: #9621 | Test Case: | Blocking: | Differential Revisions: Phab:D209 -------------------------------------+------------------------------------- Changes (by George): * cc: George (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:37 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: closed Priority: normal | Milestone: 7.10.1 Component: Core Libraries | Version: Resolution: fixed | Keywords: report- Operating System: Unknown/Multiple | impact Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: #9621 | Test Case: | Blocking: | Differential Revisions: Phab:D209 -------------------------------------+------------------------------------- Comment (by ekmett): We are currently constructing a poll and summaries of two possible plans of action that will go out in the next day or so. Based on the results of that poll, which will likely run until the 28th or so, to give folks a couple of weeks to respond, Simon Peyton Jones and Simon Marlow will come to a decision on how we are going to proceed for 7.10. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:38 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: closed Priority: normal | Milestone: 7.10.1 Component: Core Libraries | Version: Resolution: fixed | Keywords: report- Operating System: Unknown/Multiple | impact Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: #9621 | Test Case: | Blocking: | Differential Revisions: Phab:D209 -------------------------------------+------------------------------------- Comment (by hvr): Replying to [comment:36 George]:
If so when will the 7.10 doc be updated to reflect them?
Which part of the documentation are you referring to, btw? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:39 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: closed Priority: normal | Milestone: 7.10.1 Component: Core Libraries | Version: Resolution: fixed | Keywords: report- Operating System: Unknown/Multiple | impact Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: #9621 | Test Case: | Blocking: | Differential Revisions: Phab:D209 -------------------------------------+------------------------------------- Comment (by George): Thanks but I don't see an answer to my questions: 1) Should the status of this ticket still be closed? This issue doesn't show on https://ghc.haskell.org/trac/ghc/wiki/Status/GHC-7.10.1 but the issue still appears to be open thus the referenced Status page doesn't give an indication of the true status of the release 2) Are all the proposed changes in 7.10RC2? wrt doc I am referring to the GHC User's Guide and Hackage documentation such as https://hackage.haskell.org/package/base-4.7.0.2/docs/Data- List.html -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:40 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: closed Priority: normal | Milestone: 7.10.1 Component: Core Libraries | Version: Resolution: fixed | Keywords: report- Operating System: Unknown/Multiple | impact Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: #9621 | Test Case: | Blocking: | Differential Revisions: Phab:D209 -------------------------------------+------------------------------------- Changes (by lelf): * cc: lelf (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:41 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: Core Libraries | Version: Resolution: | Keywords: report- Operating System: Unknown/Multiple | impact Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: #9621 | Test Case: | Blocking: | Differential Revisions: Phab:D209 -------------------------------------+------------------------------------- Changes (by ekmett): * owner: hvr => * status: closed => new * resolution: fixed => -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:42 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: new Priority: normal | Milestone: 7.10.1 Component: Core Libraries | Version: Resolution: | Keywords: report- Operating System: Unknown/Multiple | impact Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: #9621 | Test Case: | Blocking: | Differential Revisions: Phab:D209 -------------------------------------+------------------------------------- Changes (by ekmett): * owner: => hvr -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:43 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: infoneeded Priority: normal | Milestone: 7.10.1 Component: Core Libraries | Version: Resolution: | Keywords: report- Operating System: Unknown/Multiple | impact Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: #9621 | Test Case: | Blocking: | Differential Revisions: Phab:D209 -------------------------------------+------------------------------------- Changes (by ekmett): * status: new => infoneeded -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:44 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: infoneeded Priority: normal | Milestone: 7.10.1 Component: Core Libraries | Version: Resolution: | Keywords: report- Operating System: Unknown/Multiple | impact Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: #9621 | Test Case: | Blocking: | Differential Revisions: Phab:D209 -------------------------------------+------------------------------------- Comment (by ekmett): I've re-opened this ticket while we seek feedback via https://goo.gl/forms/XP1W2JdfpX to connote its as-yet-ambiguous fate. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:45 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: infoneeded Priority: normal | Milestone: 7.10.1 Component: Core Libraries | Version: Resolution: | Keywords: report- Operating System: Unknown/Multiple | impact Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: #9621 | Test Case: | Blocking: | Differential Revisions: Phab:D209 -------------------------------------+------------------------------------- Comment (by hvr): Replying to [comment:40 George]:
2) Are all the proposed changes in 7.10RC2?
wrt doc I am referring to the GHC User's Guide and Hackage documentation such as https://hackage.haskell.org/package/base-4.7.0.2/docs/Data- List.html
You can take a look at the base-4.8 candidate documentation for the mean- time which is fairly recent: http://hackage.haskell.org/package/base-4.8.0.0/candidate -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:46 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9586: Implement Traversable/Foldable-Burning-Bridges Proposal -------------------------------------+------------------------------------- Reporter: hvr | Owner: hvr Type: task | Status: closed Priority: normal | Milestone: 7.10.1 Component: Core Libraries | Version: Resolution: fixed | Keywords: report- Operating System: Unknown/Multiple | impact Type of failure: None/Unknown | Architecture: Blocked By: | Unknown/Multiple Related Tickets: #9621 | Test Case: | Blocking: | Differential Revisions: Phab:D209 -------------------------------------+------------------------------------- Changes (by George): * status: infoneeded => closed * resolution: => fixed Comment: It has been decided that we will move do this for 7.10.1, see https://mail.haskell.org/pipermail/libraries/2015-February/025009.html -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9586#comment:47 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC