[GHC] #13478: Data.List.NonEmpty.{unfold,unfoldr} differences

#13478: Data.List.NonEmpty.{unfold,unfoldr} differences -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: feature | Status: new request | Priority: normal | Milestone: Component: | Version: 8.0.1 libraries/base | 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: -------------------------------------+------------------------------------- Is there a difference between [https://hackage.haskell.org/package/base-4.9.0.0/docs/Data-List- NonEmpty.html#v:unfoldr Data.List.NonEmpty.unfoldr] and [https://hackage.haskell.org/package/base-4.9.0.0/docs/Data-List- NonEmpty.html#v:unfold Data.List.NonEmpty.unfold]? If there is a difference it would be nice to have that clarified in the docs -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13478 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13478: Data.List.NonEmpty.{unfold,unfoldr} differences -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 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): * cc: ekmett (added) Comment: They seem to differ subtly in their bottoming behavior, but it's far from clear whether this was intentional. Edward, you wrote this code originally, right? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13478#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13478: Data.List.NonEmpty.{unfold,unfoldr} differences -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: feature request | Status: new Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 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: | -------------------------------------+------------------------------------- Comment (by ekmett): We can drop one of them. The `Data.List.NonEmpty` API was originally made by consolidating 2-3 different APIs from different authors to get a common API we could agree on. I apparently missed de-duplicating this corner of it. It probably should be `unfoldr` in name. I have no preference between the two implementations though. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13478#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13478: Data.List.NonEmpty.{unfold,unfoldr} differences -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: feature request | Status: new Priority: high | Milestone: 8.2.1 Component: libraries/base | Version: 8.0.1 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): * priority: normal => high * milestone: => 8.2.1 Comment: Alright, I suppose at this point we should probably go through the usual three-release deprecation cycle. We can at very least try to add the deprecation pragma in 8.2.1. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13478#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13478: Data.List.NonEmpty.{unfold,unfoldr} differences -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: feature request | Status: new Priority: high | Milestone: 8.2.1 Component: libraries/base | Version: 8.0.1 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: | -------------------------------------+------------------------------------- Comment (by ekmett): We can deprecate it in one release and remove it in the next and comply with the three release policy just fine. The other combinator already exists, and you can write code that is backwards compatible for 3 releases just by using whichever one we don't deprecate. Heck, the three release policy would be satisfied with just outright removing one with no deprecation period at all, so its more just a courtesy than anything to deprecate. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13478#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13478: Data.List.NonEmpty.{unfold,unfoldr} differences -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: feature request | Status: patch Priority: high | Milestone: 8.2.1 Component: libraries/base | Version: 8.0.1 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:D3422 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: new => patch * differential: => Phab:D3422 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13478#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13478: Data.List.NonEmpty.{unfold,unfoldr} differences -------------------------------------+------------------------------------- Reporter: Iceland_jack | Owner: (none) Type: feature request | Status: closed Priority: high | Milestone: 8.2.1 Component: libraries/base | Version: 8.0.1 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:D3422 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * status: patch => closed * resolution: => fixed Comment: Merged as ce9b6170b0ac9ff417000d8e7bdff7b2298f2978. Merged to `ghc-8.2` as 881793ec8730a1c98da424bdac0d03dfe77e5c1f. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13478#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC