[GHC] #10865: Poly-kinded Const
#10865: Poly-kinded Const -------------------------------------+------------------------------------- Reporter: int-index | Owner: ekmett Type: feature | Status: new request | Priority: normal | Milestone: Component: Core | Version: 7.10.2 Libraries | Keywords: poly- | Operating System: Unknown/Multiple kinded, Const | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- Currently `Const` is defined as {{{ newtype Const a b = Const { getConst :: a } }}} I propose to define it poly-kinded in the second argument like so: {{{ newtype Const a (b :: k) = Const { getConst :: a } }}} This should be completely backwards-compatible. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10865> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10865: Poly-kinded Const -------------------------------------+------------------------------------- Reporter: int-index | Owner: ekmett Type: feature request | Status: new Priority: normal | Milestone: Component: Core Libraries | Version: 7.10.2 Resolution: | Keywords: poly- | kinded, Const Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by goldfire): Simply enabling `-XPolyKinds` in the defining module should do the trick. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10865#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10865: Poly-kinded Const -------------------------------------+------------------------------------- Reporter: int-index | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Core Libraries | Version: 7.10.2 Resolution: | Keywords: poly- | kinded, Const Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by RyanGlScott): * cc: RyanGlScott, ekmett (added) -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10865#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10865: Poly-kinded Const -------------------------------------+------------------------------------- Reporter: int-index | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Core Libraries | Version: 7.10.2 Resolution: | Keywords: poly- | kinded, Const Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by RyanGlScott): This is a duplicate of #10039, no? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10865#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10865: Poly-kinded Const -------------------------------------+------------------------------------- Reporter: int-index | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Core Libraries | Version: 7.10.2 Resolution: | Keywords: poly- | kinded, Const Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by int-index): Replying to [comment:4 RyanGlScott]:
This is a duplicate of #10039, no?
Oops, it is. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10865#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10865: Poly-kinded Const -------------------------------------+------------------------------------- Reporter: int-index | Owner: Type: feature request | Status: closed Priority: normal | Milestone: Component: Core Libraries | Version: 7.10.2 Resolution: duplicate | Keywords: poly- | kinded, Const Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by int-index): * status: new => closed * resolution: => duplicate -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10865#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#10865: Poly-kinded Const -------------------------------------+------------------------------------- Reporter: int-index | Owner: Type: feature request | Status: closed Priority: normal | Milestone: Component: Core Libraries | Version: 7.10.2 Resolution: duplicate | Keywords: poly-kinded, | Const Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"edcf17bd2ae503c2dda43ded40dca0950edfd018/ghc" edcf17b/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="edcf17bd2ae503c2dda43ded40dca0950edfd018" Move Const to own module in Data.Functor.Const and enable PolyKinds `Const` from `Control.Applicative` can trivially be made kind-polymorphic in its second argument. There has been a Trac issue about this for nearly a year now. It doesn't look like anybody objects to it, so I figured I might as well make a patch. Trac Issues: #10039, #10865, #11135 Differential Revision: https://phabricator.haskell.org/D1630 Reviewers: ekmett, hvr, bgamari Subscribers: RyanGlScott, thomie }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10865#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC