[GHC] #12402: Add fromLeft and fromRight to Data.Either
#12402: Add fromLeft and fromRight to Data.Either -------------------------------------+------------------------------------- Reporter: mettekou | Owner: Type: feature | Status: new request | Priority: normal | Milestone: Component: | Version: 8.0.1 libraries/base | Keywords: Data.Either, | Operating System: Unknown/Multiple fromLeft, fromRight | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- This ticket is the result of [https://mail.haskell.org/pipermail/libraries/2016-June/027093.html the discussion of the proposal on the libraries mailing list] to add the following two functions to Data.Either in base: {{{#!hs fromLeft :: a -> Either a b -> a fromRight :: b -> Either a b -> b }}} The functions extract an {{{Either a b}}} value for the constructors in their namesake, providing their first argument as a default value for values created using the other constructor. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12402> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12402: Add fromLeft and fromRight to Data.Either -------------------------------------+------------------------------------- Reporter: mettekou | Owner: Type: feature request | Status: patch Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: | Keywords: Data.Either, | fromLeft, fromRight 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 mettekou): * status: new => patch -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12402#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12402: Add fromLeft and fromRight to Data.Either -------------------------------------+------------------------------------- Reporter: mettekou | Owner: Type: feature request | Status: patch Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: | Keywords: Data.Either, | fromLeft, fromRight Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): D2403 Wiki Page: | -------------------------------------+------------------------------------- Changes (by mettekou): * differential: => D2403 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12402#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12402: Add fromLeft and fromRight to Data.Either -------------------------------------+------------------------------------- Reporter: mettekou | Owner: Type: feature request | Status: patch Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: | Keywords: Data.Either, | fromLeft, fromRight Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2403 Wiki Page: | -------------------------------------+------------------------------------- Changes (by mpickering): * differential: D2403 => Phab:D2403 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12402#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12402: Add fromLeft and fromRight to Data.Either -------------------------------------+------------------------------------- Reporter: mettekou | Owner: Type: feature request | Status: closed Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: fixed | Keywords: Data.Either, | fromLeft, fromRight Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2403 Wiki Page: | -------------------------------------+------------------------------------- Changes (by mettekou): * status: patch => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12402#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12402: Add fromLeft and fromRight to Data.Either -------------------------------------+------------------------------------- Reporter: mettekou | Owner: Type: feature request | Status: closed Priority: normal | Milestone: Component: libraries/base | Version: 8.0.1 Resolution: fixed | Keywords: Data.Either, | fromLeft, fromRight Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2403 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"a0f83a628cc6a00f948662f88e711c2a37bfda60/ghc" a0f83a62/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="a0f83a628cc6a00f948662f88e711c2a37bfda60" Data.Either: Add fromLeft and fromRight (#12402) Reviewers: austin, hvr, RyanGlScott, bgamari Reviewed By: RyanGlScott, bgamari Subscribers: RyanGlScott, thomie Differential Revision: https://phabricator.haskell.org/D2403 GHC Trac Issues: #12402 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12402#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12402: Add fromLeft and fromRight to Data.Either -------------------------------------+------------------------------------- Reporter: mettekou | Owner: Type: feature request | Status: closed Priority: normal | Milestone: 8.2.1 Component: libraries/base | Version: 8.0.1 Resolution: fixed | Keywords: Data.Either, | fromLeft, fromRight Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2403 Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: => 8.2.1 Comment: Thanks mettekou! -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12402#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC