[GHC] #12493: Add gcoerceWith to Data.Type.Coercion
#12493: Add gcoerceWith to Data.Type.Coercion -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: feature | Status: new request | Priority: normal | Milestone: 8.2.1 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: -------------------------------------+------------------------------------- Haskell libraries mailing list discussion: https://mail.haskell.org/pipermail/libraries/2016-July/027207.html
In Data.Type.Equality, we have both
{{{#!hs castWith :: (a :~: b) -> a -> b }}}
and
{{{#!hs gcastWith :: (a :~: b) -> (a ~ b => r) -> r }}}
But in `Data.Type.Coercion` we only have
{{{#!hs coerceWith :: Coercion a b -> a -> b }}}
It seems to me that for the sake of consistency, we should add
{{{#!hs gcoerceWith :: Coercion a b -> (Coercible a b => r) -> r gcoerceWith Coercion a = a }}}
David Feuer
I've wanted this too. Patch incoming. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12493> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12493: Add gcoerceWith to Data.Type.Coercion -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: feature request | Status: patch Priority: normal | 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:D2456 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => patch * differential: => Phab:D2456 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12493#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12493: Add gcoerceWith to Data.Type.Coercion -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: feature request | Status: patch Priority: normal | 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:D2456 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ryan Scott <ryan.gl.scott@…>): In [changeset:"113d50b791c469394d38fab6ce5b760e5e8c35e2/ghc" 113d50b/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="113d50b791c469394d38fab6ce5b760e5e8c35e2" Add gcoerceWith to Data.Type.Coercion Summary: For symmetry with `gcastWith` in `Data.Type.Equality`. Fixes #12493. Test Plan: It compiles Reviewers: bgamari, goldfire, hvr, austin Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2456 GHC Trac Issues: #12493 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12493#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#12493: Add gcoerceWith to Data.Type.Coercion -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: Type: feature request | Status: closed Priority: normal | 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:D2456 Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: patch => closed * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12493#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC