[GHC] #8100: Standalone deriving using template haskell
#8100: Standalone deriving using template haskell ------------------------------------+------------------------------------- Reporter: acube | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- Currently, there seems to be no support for standalone deriving in TemplateHaskell: {{{ Prelude Data.Typeable Language.Haskell.TH> :set -XStandaloneDeriving Prelude Data.Typeable Language.Haskell.TH> data Weird a (b :: * -> * -> *) c = Weird Prelude Data.Typeable Language.Haskell.TH> runQ $ [d| deriving instance Typeable Weird |] [] }}} ''Use case'': The library [http://hackage.haskell.org/package/typeable-th typeable-th] can already generate Typeable instances using TH for GHC 7.4 and 7.6. To add support for GHC 7.8 in a way that the user doesn't have to care about the version, there has to be a way to make Typeable instances via TH in GHC 7.8. This is currently impossible, but with StandaloneDeriving support for TH, it would be possible. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8100> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8100: Standalone deriving using template haskell -------------------------------------+------------------------------------ Reporter: acube | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by aavogt): * cc: vogt.adam@… (added) Comment: Some relevant discussion here as to why it's missing: http://stackoverflow.com/questions/14316656/standalone-deriving- declaration-in-template-haskell-quotation -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8100#comment:1> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8100: Standalone deriving using template haskell -------------------------------------+------------------------------------ Reporter: acube | Owner: Type: feature request | Status: new Priority: normal | Milestone: Component: Template Haskell | Version: Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by goldfire): At the least, if this remains unimplemented, quoting a use of standalone deriving should result in an error, instead of silent ignoring. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8100#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8100: Standalone deriving using template haskell -------------------------------------+------------------------------------- Reporter: acube | Owner: Type: feature | Status: new request | Milestone: Priority: normal | Version: Component: Template | Keywords: Haskell | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by dmcclean): I second the request for an error message if you quote one. The current behavior had me baffled for a while. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8100#comment:3> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8100: Standalone deriving using template haskell -------------------------------------+------------------------------------- Reporter: acube | Owner: Type: feature | Status: new request | Milestone: Priority: normal | Version: Component: Template | Keywords: Haskell | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by simonpj): Since TH syntax can't represent the declaration it's bizarre that it's accepted. But it wouldn't be hard to implement. Any volunteers? Simon -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8100#comment:4> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8100: Standalone deriving using template haskell -------------------------------------+------------------------------------- Reporter: acube | Owner: goldfire Type: feature | Status: new request | Milestone: Priority: normal | Version: Component: Template | Keywords: Haskell | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by goldfire): * owner: => goldfire Comment: I'll move this from my local, unpublicized, unofficial set of tickets I plan to address to my official set of tickets I plan to address. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8100#comment:5> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8100: Standalone deriving using template haskell -------------------------------------+------------------------------------- Reporter: acube | Owner: goldfire Type: feature | Status: new request | Milestone: Priority: normal | Version: Component: Template | Keywords: Haskell | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by GregWeber): I am willing to help test this out. Need it for the persistent library. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8100#comment:6> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8100: Standalone deriving using template haskell -------------------------------------+------------------------------------- Reporter: acube | Owner: goldfire Type: feature | Status: new request | Milestone: Priority: normal | Version: Component: Template | Keywords: Haskell | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by goldfire): See [wiki:Design/TemplateHaskellGADTs] for a related change to the `Dec` type I'd like feedback on. -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8100#comment:7> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8100: Standalone deriving using template haskell -------------------------------------+------------------------------------- Reporter: acube | Owner: goldfire Type: feature | Status: patch request | Milestone: Priority: normal | Version: Component: Template | Keywords: Haskell | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: | Differential Revisions: Phab:D439 | -------------------------------------+------------------------------------- Changes (by goldfire): * status: new => patch * differential: => Phab:D439 -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8100#comment:8> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8100: Standalone deriving using template haskell -------------------------------------+------------------------------------- Reporter: acube | Owner: goldfire Type: feature | Status: patch request | Milestone: Priority: normal | Version: Component: Template | Keywords: Haskell | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: | Differential Revisions: Phab:D439 | -------------------------------------+------------------------------------- Comment (by Richard Eisenberg <eir@…>): In [changeset:"4ac9e902327683ba032df5fb0e92a80c7b7fccd4/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="4ac9e902327683ba032df5fb0e92a80c7b7fccd4" Fix #8100, by adding StandaloneDerivD to TH's Dec type. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8100#comment:10> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8100: Standalone deriving using template haskell -------------------------------------+------------------------------------- Reporter: acube | Owner: goldfire Type: feature | Status: patch request | Milestone: Priority: normal | Version: Component: Template | Keywords: Haskell | Architecture: Unknown/Multiple Resolution: | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: | Differential Revisions: Phab:D439 | -------------------------------------+------------------------------------- Comment (by Richard Eisenberg <eir@…>): In [changeset:"767feb370d0a05a78a34a9498fe11b90d395d158/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="767feb370d0a05a78a34a9498fe11b90d395d158" Test #8100 in th/T8100 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8100#comment:9> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8100: Standalone deriving using template haskell -------------------------------------+------------------------------------- Reporter: acube | Owner: goldfire Type: feature | Status: closed request | Milestone: Priority: normal | Version: Component: Template | Keywords: Haskell | Architecture: Unknown/Multiple Resolution: fixed | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: th/T8100 | Blocking: | Differential Revisions: Phab:D439 | -------------------------------------+------------------------------------- Changes (by goldfire): * status: patch => closed * testcase: => th/T8100 * resolution: => fixed -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8100#comment:11> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8100: Standalone deriving using template haskell -------------------------------------+------------------------------------- Reporter: acube | Owner: goldfire Type: feature | Status: closed request | Milestone: Priority: normal | Version: Component: Template | Keywords: Haskell | Architecture: Unknown/Multiple Resolution: fixed | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: th/T8100 | Blocking: | Differential Revisions: Phab:D439 | -------------------------------------+------------------------------------- Comment (by Richard Eisenberg <eir@…>): In [changeset:"786b62aa57e4dcc528e2da2f7d0451ab834d655a/ghc"]: {{{ #!CommitTicketReference repository="ghc" revision="786b62aa57e4dcc528e2da2f7d0451ab834d655a" Add release notes for #8100, #9527, and #9064. }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8100#comment:12> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8100: Standalone deriving using template haskell -------------------------------------+------------------------------------- Reporter: acube | Owner: goldfire Type: feature | Status: closed request | Milestone: Priority: normal | Version: Component: Template | Keywords: Haskell | Architecture: Unknown/Multiple Resolution: fixed | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: th/T8100 | Blocking: | Differential Revisions: Phab:D439 | -------------------------------------+------------------------------------- Comment (by vxanica): Will it be merged into next release? -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8100#comment:13> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
#8100: Standalone deriving using template haskell -------------------------------------+------------------------------------- Reporter: acube | Owner: goldfire Type: feature | Status: closed request | Milestone: Priority: normal | Version: Component: Template | Keywords: Haskell | Architecture: Unknown/Multiple Resolution: fixed | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: th/T8100 | Blocking: | Differential Revisions: Phab:D439 | -------------------------------------+------------------------------------- Comment (by simonpj): Replying to [comment:13 vxanica]:
Will it be merged into next release?
For 7.10, yes certainly. Simon -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8100#comment:14> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler
participants (1)
-
GHC